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

[BUG] updateCheck disallow non-interactive setup #563

Closed
silviofdez opened this issue Dec 5, 2017 · 7 comments · Fixed by #578
Closed

[BUG] updateCheck disallow non-interactive setup #563

silviofdez opened this issue Dec 5, 2017 · 7 comments · Fixed by #578
Assignees
Labels

Comments

@silviofdez
Copy link

silviofdez commented Dec 5, 2017

if (process.argv.length > 2 && process.argv[2] !== 'run') {

From ghot-cli 1.3.0 on wards, there is no way to proceed with unattended installations (--no-prompt) when a newer version of ghos-cli is detected. It could be useful in some circumstances but, under different ones, it should be avoidable.

I.E. when trying to install you need to pass ghost a lot of parameters if using in a non-interactive way setup ........ but it becomes interactive because inquirer launch a question after the updateCheck. This is not consistent.

Related: #525

acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Dec 12, 2017
closes TryGhost#565, TryGhost#563
- move update check further into the stack behind a "checkVersion" command flag
- rewrite checkUpdate class to use UI instace
- update tests
acburdine added a commit that referenced this issue Dec 12, 2017
closes #565, #563
- move update check further into the stack behind a "checkVersion" command flag
- rewrite checkUpdate class to use UI instace
- update tests
@acburdine
Copy link
Member

Closed by #566

@tianon
Copy link

tianon commented Dec 12, 2017

Ran into this same issue with the latest release -- Docker official image builds of ghost started failing due to this prompt being displayed even in the non-TTY case (where stdin is even closed, which is the only reason it fails instead of simply hanging AFAICT).

In digging in the code, I found that this prompt is always enabled for the subcommands which #566 limited it to (regardless of the value of the --prompt flag, as @silviofdez has noted above).

We do plan to update ghost-cli in the images, but it'd be nice if we didn't have all the old images start failing to build immediately in the interim, especially since our Dockerfile is already hard-locked to both a specific version of Ghost-CLI and Ghost, so we should be getting the same experience every time both before and after a new version of Ghost-CLI is released. I'd thus respectfully request that this issue be reopened with a proposed fix being a method for either disabling this check or turning it into a warning instead. 🙏 ❤️

@acburdine
Copy link
Member

@tianon that’s a fair point - I’ll push a new fix. Sorry for the trouble!

@acburdine acburdine reopened this Dec 13, 2017
@tianon
Copy link

tianon commented Dec 13, 2017

Thanks @acburdine, you're a hero! ❤️

@acburdine
Copy link
Member

@tianon apologies for the delay - I'll get a version out with this fix later today :)

acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jan 7, 2018
closes TryGhost#563
- remove prompt on update-check because it was bad UX & broke docker
acburdine added a commit to acburdine/Ghost-CLI that referenced this issue Jan 7, 2018
closes TryGhost#563
- remove prompt on update-check because it was bad UX & broke docker
acburdine added a commit that referenced this issue Jan 7, 2018
closes #563
- remove prompt on update-check because it was bad UX & broke docker
@acburdine
Copy link
Member

@tianon The new version has been published as 1.4.2. The docker builds will probably break for this release (because the 1.4.1 version still contains the issue), but after fixing it this time the builds shouldn't break again. Sorry for the trouble!

@tianon
Copy link

tianon commented Jan 8, 2018

Amazing, thanks so much @acburdine!! ❤️ ❤️

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