HomePhabricator
Diffusion Comm 56a05cf0c33d

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

Description

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

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

Reviewers: ashoat, atul, varun, abosh

Reviewed By: ashoat

Subscribers: tomek, adrian

Differential Revision: https://phab.comm.dev/D4659

Details

Provenance
jonAuthored on Jul 27 2022, 4:15 PM
Reviewer
ashoat
Differential Revision
D4659: [Nix] Fix source usage of source-nvm.sh
Parents
rCOMMdbe97ad840bf: [Nix] Rephrase motivation behind pinning to better reflect upstream
Branches
Unknown
Tags
Unknown