Skip to content
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

yarn publish --non-interactive still asks questions #5002

Closed
dmerejkowsky opened this issue Nov 27, 2017 · 9 comments · Fixed by #5108
Closed

yarn publish --non-interactive still asks questions #5002

dmerejkowsky opened this issue Nov 27, 2017 · 9 comments · Fixed by #5108

Comments

@dmerejkowsky
Copy link

yarn 1.3.2
node 9.2.0

steps to reproduce

$ mkdir hello
$ yarn init
$ yarn publish --non-interactive

actual

yarn stops with:

yarn publish v1.3.2
[1/4] Bumping version...
info Current version: 1.0.0
question New version: 

expected

An error message stating that --non-interactive must be used with --new-version ?

notes

yarn --non-interactive also stops if no npm token is found.

@ghost ghost assigned bestander Nov 27, 2017
@ghost ghost added the triaged label Nov 27, 2017
@bestander
Copy link
Member

Good find!
https://github.com/yarnpkg/yarn/blob/master/src/cli/commands/publish.js needs to respect this flaG!

Good first PR!

@iansu
Copy link
Contributor

iansu commented Dec 18, 2017

Is anyone working on this? If not then I'd like to do it.

@bestander
Copy link
Member

@iansu, go ahead!

@iansu
Copy link
Contributor

iansu commented Dec 18, 2017

Will do. Just to confirm, the basic idea is to display an error if --non-interactive is specified without --new-version? And also just fail with an error if no NPM token is present instead of prompting for it?

@bestander
Copy link
Member

bestander commented Dec 18, 2017 via email

@stijndepestel
Copy link

Is there an update on this? I want to use yarn in our CI/CD environment since it is faster than npm, however, without this option working we cannot use yarn to automate our release/publish mechanism.

@bestander
Copy link
Member

bestander commented Feb 14, 2018 via email

@iansu
Copy link
Contributor

iansu commented Feb 14, 2018

I made a PR for this a couple of months ago: #5108

@dmerejkowsky
Copy link
Author

@stijndepestel

I want to use yarn in our CI/CD environment since it is faster than npm, however, without this option working we cannot use yarn to automate our release/publish mechanism.

At work we have fully automated CI/CD and we use yarn for everything except the last call to npm publish.

it works quite well :)

bestander pushed a commit that referenced this issue Feb 17, 2018
… is specified (#5002) (#5108)

* chore(cli): don't ask questions during publish when --non-interactive is specified (#5002)

* Fix failing tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants