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)
Sat, Jun 22, 7:48 AM
Unknown Object (File)
Sat, Jun 22, 1:30 AM
Unknown Object (File)
Thu, Jun 20, 4:30 PM
Unknown Object (File)
Thu, Jun 13, 6:33 AM
Unknown Object (File)
Wed, Jun 12, 11:17 AM
Unknown Object (File)
Thu, Jun 6, 5:51 AM
Unknown Object (File)
Thu, Jun 6, 5:51 AM
Unknown Object (File)
Tue, Jun 4, 6:02 PM
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