You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thus i added some debug code which print the directory name found by the builder.sh:
fordin*;doif [ "$src"==*"$d"* ] && [ -d"$d" ];thencd"$d"echo"$d"# THIS IS THE DEBUG CODE I ADDEDbreakfidone
To my suprprise this prints "Desktop" instead of "hello-2.10" .
Which makes sense because this loop (iiuic) iterates over every file and if it's a directory it cd's into it.
jane@nixos:~]$ ls -l
total 6180
-rw-r--r-- 1 jane users 362 Jan 24 08:26 autotools.nix
-rw-r--r-- 1 jane users 371 Jan 24 09:47 builder.sh
drwxr-xr-x 2 jane users 4096 Dec 28 20:04 Desktop
drwxr-xr-x 2 jane users 4096 Dec 28 20:04 Documents
drwxr-xr-x 2 jane users 4096 Jan 21 10:44 Downloads
drwxr-xr-x 12 jane users 4096 Nov 16 2014 hello-2.10
-rw-r--r-- 1 jane users 725946 Jan 21 10:57 hello-2.10.tar.gz
-rw-r--r-- 1 jane users 140 Jan 24 09:31 hello.nix
[....]
and Desktop is the first directory therefore it will cd into "Desktop" instead of "hello-2.10" .
Trying out Nix Pill Nr. 10 Part 1:
It says:
source builder.sh
But this fails with :
thus i added some debug code which print the directory name found by the builder.sh:
To my suprprise this prints "Desktop" instead of "hello-2.10" .
Which makes sense because this loop (iiuic) iterates over every file and if it's a directory it cd's into it.
and Desktop is the first directory therefore it will cd into "Desktop" instead of "hello-2.10" .
Imo this is a bug in builder.sh.
With the following workaround it will work:
But I think the proper way would be to change the "cd"-logic in builder.sh
The text was updated successfully, but these errors were encountered: