cloudant / nodejs-cloudant

Cloudant Node.js client library
Apache License 2.0
255 stars 90 forks source link

Removed sudo from `npm-cli-login` during publish #371

Closed ricellis closed 5 years ago

ricellis commented 5 years ago

Checklist

Description

Removed sudo and global install for npm-cli-login module during publish step.

1. Steps to reproduce and the simplest code sample possible to demonstrate the issue

Using new Jenkins executor image to run publication step.

2. What you expected to happen

Publication without errors

3. What actually happened

EACCES errors are observed during publish (e.g. similar to this for couchbackup): https://cloudant-sdks-jenkins.swg-devops.com:8443/job/couchbackup/job/master/15/execution/node/103/log/

Approach

The sudo installation of the npm-cli-login package is creating $HOME/.npm with root as the owner, causing subsequent errors when not running as root.

The package does not need to be installed globally and can therefore be installed without using sudo by qualifying the path used for the subsequent commands.

Schema & API Changes

Security and Privacy

Testing

Monitoring and Logging