Page MenuHomePhabricator

[Nix] Fix source usage of source-nvm.sh
ClosedPublic

Authored by jon on Jul 27 2022, 4:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 9:39 PM
Unknown Object (File)
Sun, Nov 3, 7:45 PM
Unknown Object (File)
Sun, Nov 3, 7:45 PM
Unknown Object (File)
Sun, Nov 3, 7:44 PM
Unknown Object (File)
Sun, Nov 3, 7:26 PM
Unknown Object (File)
Oct 17 2024, 1:25 PM
Unknown Object (File)
Oct 7 2024, 4:55 AM
Unknown Object (File)
Oct 6 2024, 8:39 AM
Subscribers

Details

Summary

exit 0 will cause the current current process to end.
Normally this is okay when executing a script (e.g. ./source-nvm.sh),
but when sourcing it (e.g. . source-nvm.sh) will cause the current
shell/process to end.

Use of return 0 will cause the shell "function" (in this case the sourced
script) to return with the status 0 to the calling scope (e.g. yarn dev)

Full disclosure: I only partially tested this. I Don't have a database
configured, and setting up the database instances through nix is future work.
I was able to assert that running running (cd keyserver && yarn dev &) now
correctly waits for changes in keyserver/dist/

Test Plan

Then run:

nix develop
yarn cleaninstall

# start web or landing dev
(cd web && yarn dev &)

# start keyserver
cd keyserver
yarn dev

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable