add -- after readlink
This commit is contained in:
parent
dc53523deb
commit
40950a0b52
12
urchin
12
urchin
@ -25,7 +25,7 @@ urchin_root() {
|
||||
orig="$1"
|
||||
fi
|
||||
|
||||
if test "$(readlink -f "$1")" = /; then
|
||||
if test "$(readlink -f -- "$1")" = /; then
|
||||
# Stop traversing upwards at /
|
||||
if test -d "$orig"; then
|
||||
origdir="$orig"
|
||||
@ -35,7 +35,7 @@ urchin_root() {
|
||||
echo "You need to create the .urchin directory in the root of your tests,
|
||||
maybe like this:
|
||||
|
||||
mkdir '$(readlink -f "$(remove_trailing_slash "$origdir")")/.urchin'
|
||||
mkdir '$(readlink -f -- "$(remove_trailing_slash "$origdir")")/.urchin'
|
||||
" >&2
|
||||
return 1
|
||||
elif ! test -e "$current"; then
|
||||
@ -70,8 +70,8 @@ escape_slashes() {
|
||||
}
|
||||
|
||||
get_stdout_file() {
|
||||
root="$(readlink -f "$(urchin_root "$1")")"
|
||||
test_file="$(readlink -f "$1")"
|
||||
root="$(readlink -f -- "$(urchin_root "$1")")"
|
||||
test_file="$(readlink -f -- "$1")"
|
||||
eroot="$(escape_slashes "$root")"
|
||||
base="$(echo "$test_file" | sed "s/^$eroot/$eroot\/.urchin/")"
|
||||
if test -d "$1"; then
|
||||
@ -373,9 +373,9 @@ if test -z "$I_AM_SOURCING_URCHIN_IN_A_TEST"; then
|
||||
# Run or present the Molly guard.
|
||||
if ! urchin_root "$1" > /dev/null; then
|
||||
exit 1
|
||||
elif basename "$(readlink -f "$(urchin_root "$1")")" |
|
||||
elif basename "$(readlink -f -- "$(urchin_root "$1")")" |
|
||||
grep -Fi 'test' > /dev/null || $force; then
|
||||
logfile="$(readlink -f "$(urchin_root "$1")/.urchin/.log")"
|
||||
logfile="$(readlink -f -- "$(urchin_root "$1")/.urchin/.log")"
|
||||
printf '' > "$logfile"
|
||||
urchin_go "$1" "$shell_for_sh_tests"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user