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
Ghost install thinks it’s running in a non interactive shell #1788
Comments
When you say the CLI "has issues", could you be specific what those are? What was the problem was supplying all details as command line arguments? In your blog post, it appears that you are reporting that the script is working. |
That's correct, my script is working. I ended up worked around the issues I stumbled upon. What I wanted to do:
What I ended up doing:
Technically, I was able to work around this. But, it does appear something with the CLI is not allowing it to be run interactively the way I was attempting. LMK if that makes more sense and/or if you have any further questions. |
Thanks for the details. It'snot clear there's a bug in Ghost-CLI here. It works in the normal interactive case and as you mentioned, for the non-interactive case, command line options can be passed. It seems like if you wanted Ghost to prompt users for answers, then it would be the responsibility of your software to set up the environment so that the terminal is interactive. Sometimes the |
I debated using |
@danielraffel Thanks for your sharing your code and your enthusiasm to make it easier for more people to get free Ghost hosting on Google Cloud. I'm not a Ghost CLI maintainer myself. It's interesting here that some other interactive CLIs and prompts worked for you when Ghost's CLI does not. Maybe Ghost's CLI does indeed have a challenge between switching between interactive and non-interactive terminal handling. |
Our bot has automatically marked this issue as stale because there has not been any activity here in some time. The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR. We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂 |
Welcome to Ghost-CLI's GitHub repo! 👋🎉
Do you need help or have a question? Please come chat in our forum: https://forum.ghost.org 👫.
Docs: https://ghost.org/docs/ 📖.
Please be aware that the team behind the Ghost CLI only supports the recommended stack: https://github.com/TryGhost/Ghost-cli#recommended-stack.
Summary
I am trying to run ghost install from a script, that’s running in an interactive SSH shell, running on a VM in interactive mode.
Local machine
VM
It appears that Ghost install (eg the CLI) thinks it’s running in a non interactive shell the way I am using it. Perhaps there's something the CLI could enable to support this use case? I have tried forcing pseudo emulation mode with -tt but that hasn't worked either.
Steps to Reproduce
Some background context: I am trying to make it easy for others to install Ghost on a free-tier Google micro-instance and have started this project which is very close to working:
I run the setup script (sh gcloud_ghost_instancer.sh) on my local machine. It does a bunch of stuff to create and setup the google VM. Once the VM is created it 1) the script SSH’s in to the VM using a service-account with sudo access via an interactive shell 2) downloads another script on to the VM 3) runs the downloaded script to prepare the machine for, and install, Ghost:
The script running on the server (install_on_server.sh) is running inside the SSH shell. As alluded to in my original comment, I had started writing this script by passing variables to the ghost installer (minus the URL) hoping it would trigger just that part of the installer for a user to configure (and automate the rest). But, when I had a long string of parameters, I kept getting an error about not passing --URL. Then, when I removed all parameters and just ran Ghost Install I started getting errors that the “content folder is not owned by the current user ghost install” This is confusing since you see below the folders are setup correctly. However, this is is running inside a shell, on a VM, by a service-account with sudo access. These are the parts of the script which seem to not be working correctly.
Assumptions based on all that…
Log file
Here is output from the installer
Technical details
This is automatically output by Ghost-CLI if an error occurs, please copy & paste:
Bug submission checklist
Please fill out this checklist to acknowledge that you followed the requirements to submit a bug report.
The text was updated successfully, but these errors were encountered: