@ Aurélien Thieriot: thanks for the tip.
I have two solutions for my problem:
Solution 1
export NPM_AUTH_TOKEN=myToken export NPM_EMAIL=myEmail
create / override ~/.npmrc using the following shell script:
echo "_auth = $NPM_AUTH_TOKEN" > ~/.npmrc echo "email = $NPM_EMAIL" >> ~/.npmrc
Decision 2
export NPM_USERNAME=myUsername export NPM_PASSWORD=myPassword export NPM_EMAIL=myEmail
I know the order of the questions. So I can do the following:
npm adduser <<! $NPM_USERNAME $NPM_PASSWORD $NPM_EMAIL !
Note: Solution 2 only works when the user has not yet been added.
Otherwise, $NPM_PASSWORD not required
ke_wa
source share