diff --git a/test/sharness/lib/test-lib.sh b/test/sharness/lib/test-lib.sh index e67f56d4b..145420fa6 100644 --- a/test/sharness/lib/test-lib.sh +++ b/test/sharness/lib/test-lib.sh @@ -9,17 +9,15 @@ # use the ipfs tool to test against # add current directory to path, for ipfs tool. -if test "$MAKE_SKIP_PATH" != "1"; then - BIN=$(cd .. && echo `pwd`/bin) - BIN2=$(cd ../.. && echo `pwd`/cmd/ipfs) - PATH=${BIN2}:${BIN}:${PATH} +BIN=$(cd .. && pwd)/bin +BIN2=$(cd ../.. && pwd)/cmd/ipfs +PATH=${BIN2}:${BIN}:${PATH} - # assert the `ipfs` we're using is the right one. - if test `which ipfs` != ${BIN2}/ipfs; then - echo >&2 "Cannot find the tests' local ipfs tool." - echo >&2 "Please check test and ipfs tool installation." - exit 1 - fi +# assert the `ipfs` we're using is the right one. +if test "$(which ipfs)" != "${BIN2}/ipfs"; then + echo >&2 "Cannot find the tests' local ipfs tool." + echo >&2 "Please check test and ipfs tool installation." + exit 1 fi # set sharness verbosity. we set the env var directly as