Open
Description
Hi, I am using the artifacts-helper to get auth token for .npmrc. It works fine if I run yarn
directly from the terminal. However, I see an error when trying to call yarn
in a shell script.
error An unexpected error occurred: "Failed to replace env in config: ${ARTIFACTS_ACCESSTOKEN}"
I believe this is because an alias for yarn set in bashrc: alias yarn=/usr/local/bin/run-yarn.sh
does not work if I call yarn
from a shell script. Currently, as a workaround, I need to have a check if /usr/local/bin/run-yarn.sh
exists then run it instead of yarn
, something like:
# this is to support codespace (should find a better way to not have codespace specific code in the repo)
if [ -f "/usr/local/bin/run-yarn.sh" ]; then
/usr/local/bin/run-yarn.sh lint-staged
else
yarn lint-staged
fi
But I wonder if there is any recommendation to get over this issue to not have this check in all scripts, and also not have codespace specific code in the source repo.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels