aws codeartifact login --tool npm
fails with "This command does not support workspaces."
#8555
Labels
bug
This issue is a bug.
codeartifact login
customization
Issues related to CLI customizations (located in /awscli/customizations)
p2
This is a standard priority issue
Describe the bug
I cannot run
aws codeartifact login --tool npm
when inside of a npm workspace. The command fails with "This command does not support workspaces". See the "Reproduction Steps" below for more details.Expected Behavior
I expect to be able to run this command anywhere and have it behave the same (that is, update my
~/.npmrc
file).Current Behavior
See the "Reproduction Steps" below for an example of how to repro with the errors inline.
Reproduction Steps
To reproduce, create a simple npm workspace and cd into it. I've created a dead simple repo for this:
And here's a (redacted)
aws codeartifact login
command that fails:Or, here's a simpler command that is not redacted:
Possible Solution
This is arguably a bug with npm itself, and it's already filed upstream in npm/cli#6099. I can't tell if they're interested in fixing this, though. There is a workaround described here, which would be easy to port to the relevant calls to
npm config set
in aws-cli.I'd be happy to send in a PR implementing this workaround if you're open to it.
Additional Information/Context
No response
CLI version used
2.15.24
Environment details (OS name and version, etc.)
Linux (NixOS unstable)
The text was updated successfully, but these errors were encountered: