-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
fix(root-user): show different error message for 1-click installs #631
Conversation
lib/utils/check-root-user.js
Outdated
// We have a Digitalocean one click installation | ||
console.error(`${chalk.yellow('We discovered that you are using the Digitalocean 1-click install.')} | ||
You need to create a user with regular account privileges and migrate your installation to use this user. | ||
Please follow the steps here ${chalk.underline.green('https://docs.ghost.org/docs/troubleshooting#section-fix-root-user')} to fix your setup.`); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
e55ba4e
to
4dc7d07
Compare
lib/utils/check-root-user.js
Outdated
process.exit(1); | ||
} | ||
|
||
return; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/utils/check-root-user.js
Outdated
|
||
if (!includes(allowedCommands, command)) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/utils/check-root-user.js
Outdated
You need to create a user with regular account privileges and migrate your installation to use this user. | ||
Please follow the steps here ${chalk.underline.green('https://docs.ghost.org/docs/troubleshooting#section-fix-root-user')} to fix your setup.`); | ||
} else if (isRootInstall()) { | ||
console.error(`${chalk.yellow('It seems installed Ghost as root user.')} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/utils/check-root-user.js
Outdated
// We have a Digitalocean one click installation | ||
console.error(`${chalk.yellow('We discovered that you are using the Digitalocean One-Click install.')} | ||
You need to create a user with regular account privileges and migrate your installation to use this user. | ||
Please follow the steps here ${chalk.underline.green('https://docs.ghost.org/docs/troubleshooting#section-fix-root-user')} to fix your setup.`); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/utils/check-root-user.js
Outdated
} else if (isRootInstall()) { | ||
console.error(`${chalk.yellow('It seems installed Ghost as root user.')} | ||
You need to create a user with regular account privileges and migrate your installation to use this user. | ||
Please follow the steps here ${chalk.underline.green('https://docs.ghost.org/docs/troubleshooting#section-fix-root-user')} to fix your setup.`); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
lib/utils/check-root-user.js
Outdated
if (os.platform() !== 'linux') { | ||
const isRootInstall = function isRootInstall() { | ||
const path = require('path'); | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
no issue - detect DigitalOcean One-Click install and render a message how to migrate their installation to a non-root user - detect root installs and render message to migrate their installation to a non-root user - allow ghost `start`, `stop` and `restart` to be executed as root without exiting, but showing the error message
4dc7d07
to
b0bc7f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
no issue