-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lerna publish doesn't warn that no token is set #1347
Comments
It's not lerna's responsibility to set a token, or even be aware of what that token is/where it is located. I agree we should probably run |
Hi! Yeah I agree it's not lerna's responsibility to handle setting the token; this issue was just about failing early to limit the damage it causes. I can't seem to find a yarn equivalent to |
I have a hunch yarn has different opinions about how to resolve registry authentication. No actual proof, just bitter experience of several yarn-related lerna bugs due to inconsistent implementation of registry patterns. |
Faced a similar issue. Publishing anonymously to private registry (proget). When |
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Expected Behavior
If publish is going to fail since no token set, then abort early to prevent the repository being left in a half-published state.
Current Behavior
If no token set, publish proceeds regardless, resulting in:
Possible Solution
If npm publishing is enabled (ie the user hasn't passed
--skip-npm
to lerna publish), then check to see whether a token is set, and if not, abort the publish before doing anything.Steps to Reproduce (for bugs)
.npmrc
/.yarnrc
lerna publish
in a repo that uses lernalerna.json
Context
I thought lerna publish would prompt me for a token, avoiding the need to save it to disk. However it doesn't, and left my local state half-published, meaning I'm not sure how to retry the publish without manually unpicking the changes.
Your Environment
lerna --version
npm --version
yarn --version
node --version
The text was updated successfully, but these errors were encountered: