I would expect the overall script to have a non-0 exit code if any of the nested scripts failed (i.e. they themselves had a non-0 exit code) which would make the overall npm install fail. Need to investigate that.
Are there any workarounds to get this functionality today?
Why do you want this feature?
In the
postinstall.sh
script that is used when installing withnpm
, we use nested commands to installvscode
and its extensions - see codeAs reported in https://github.com/coder/code-server/issues/5530 (and more in https://github.com/coder/code-server/pull/5533), installs were passing but actually failing - and only was seen during runtime.
The nested installs were failing, but the errors weren't being bubbled-up... Was only seen when using
--foreground-scripts
.What is your suggestion?
--foreground-scripts
to actually see the output of the nested. We should update the doc to show that as a troubleshooting step in here: https://coder.com/docs/code-server/latest/npm#debugging-install-issues-with-npmnpm install
fail. Need to investigate that.Are there any workarounds to get this functionality today?
--foreground-scripts
and read carefully :(Are you interested in submitting a PR for this?
Yes