diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-03-14 20:06:04 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-04-13 17:27:04 +0200 |
commit | 0bc7f3440a35c318a2309f10627daa4f41029ebf (patch) | |
tree | 38a5d13b7d8eed2aba49e4bad135dc50cfa960b0 /lib | |
parent | 124cccbe3b63122733e02e41e45a383ec48752fd (diff) |
lib/tests/modules.sh: Don't depend on $PWD
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/tests/modules.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index e81cf016ee9a..6258244457aa 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -3,7 +3,10 @@ # This script is used to test that the module system is working as expected. # By default it test the version of nixpkgs which is defined in the NIX_PATH. -cd ./modules +# https://stackoverflow.com/a/246128/6605742 +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +cd "$DIR"/modules pass=0 fail=0 |