Open ThoenigAdrian opened 4 years ago
We could make the builder error out when there are multiple directories in $PWD
like the real deal does
but as you can see that would unnecessarily increase the builder complexity without adding didactic value.
It is common practice to run tutorials in their own directory, if just for the ease of clean up afterwards. It will probably be better to add such suggestion to https://nixos.org/nixos/nix-pills/working-derivation.html#idm140737316246784 instead.
yes a note in the beginning would be fine as well :)
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