yarn publish --non-interactive still asks questions

Created on 27 Nov 2017  Â·  9Comments  Â·  Source: yarnpkg/yarn

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.

cat-chore good first issue help wanted triaged

Most helpful comment

Yeah, I think it should fail fast if it try to prompt in non interactive
mode

On Mon, Dec 18, 2017 at 2:12 PM Ian Sutherland notifications@github.com
wrote:

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?

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/5002#issuecomment-352574456, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWM-ZdFlvP5UgBZvwlLmbt5I8NemSks5tBuNUgaJpZM4QsNd3
.

All 9 comments

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

Good first PR!

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

@iansu, go ahead!

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?

Yeah, I think it should fail fast if it try to prompt in non interactive
mode

On Mon, Dec 18, 2017 at 2:12 PM Ian Sutherland notifications@github.com
wrote:

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?

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/5002#issuecomment-352574456, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWM-ZdFlvP5UgBZvwlLmbt5I8NemSks5tBuNUgaJpZM4QsNd3
.

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.

The quickest way to get this in is to send a PR.
The code is quite simple

On Tue, Feb 13, 2018 at 11:39 PM Stijn De Pestel notifications@github.com
wrote:

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.

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/5002#issuecomment-365520831, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWPO6_5_0rGJZfiHuUAAHTR9i5hnmks5tUo2sgaJpZM4QsNd3
.

I made a PR for this a couple of months ago: https://github.com/yarnpkg/yarn/pull/5108

@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 :)

Was this page helpful?
0 / 5 - 0 ratings