Commit 9d118948 authored by John Firebaugh's avatar John Firebaugh Committed by Xianwen Chen

Fix run and run-assume-built scripts when CDPATH is set (#358)

When the CDPATH environment variable is set, the cd command prints the path of the directory to stdout. Redirect that output to /dev/null to avoid it being mistakenly included in the base_dir variable, which then causes cryptic errors.
parent 28b6e911
......@@ -12,7 +12,7 @@ while [ -h "$loc" ]; do
loc="`dirname "$loc"`/$link" # Relative link
fi
done
base_dir=$(cd "`dirname "$loc"`" && pwd)
base_dir=$(cd "`dirname "$loc"`" > /dev/null && pwd)
"$base_dir/build"
......
......@@ -12,6 +12,6 @@ while [ -h "$loc" ]; do
loc="`dirname "$loc"`/$link" # Relative link
fi
done
base_dir=$(cd "`dirname "$loc"`" && pwd)
base_dir=$(cd "`dirname "$loc"`" > /dev/null && pwd)
exec "$base_dir/target/start" "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment