Reported by @netoront.
To reproduce:
- Create a repo with
- A
devcontainer.json that uses the feature "ghcr.io/microsoft/codespace-features/artifacts-helper:3"
- A post-create command that runs
write-npm.sh to add an Azure Artifacts feed
- A JS project that uses NPM
- Create a Codespace
- Run
npm install in the Codespace and get 401 errors
- Run
type -t npm and see that it's a file rather than a function as expected
The bug was introduced in two steps:
- On 2025-12-04, c298b99 removed
COMMA_SEP_TARGET_FILES="${TARGETFILES:-"DEFAULT"}" and the logic below it to set the actual default value
- On 2025-12-05, e34adf2 restored the logic to set the default value but didn't restore the initialization of
COMMA_SEP_TARGET_FILES, so the default value logic gets skipped no matter what
You'll probably find in your testing that the newlines aren't being properly appended between shim function definitions. Easiest fix is to change "...stuff...\n" to "...stuff..."$'\n'.
Reported by @netoront.
To reproduce:
devcontainer.jsonthat uses the feature"ghcr.io/microsoft/codespace-features/artifacts-helper:3"write-npm.shto add an Azure Artifacts feednpm installin the Codespace and get 401 errorstype -t npmand see that it's a file rather than a function as expectedThe bug was introduced in two steps:
COMMA_SEP_TARGET_FILES="${TARGETFILES:-"DEFAULT"}"and the logic below it to set the actual default valueCOMMA_SEP_TARGET_FILES, so the default value logic gets skipped no matter what