Skip to content

Commit 09da7b1

Browse files
committed
feat(doctor) show help message for install folder checks
no issue - show clearer error message and help link to the docs, when install directory doesn't have the right permissions
1 parent 4048da0 commit 09da7b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/commands/doctor/checks/install-folder-permissions.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22
const fs = require('fs-extra');
33
const constants = require('constants');
4+
const chalk = require('chalk');
45

56
const errors = require('../../../errors');
67
const checkDirectoryAndAbove = require('./check-directory');
@@ -10,8 +11,8 @@ const taskTitle = 'Checking current folder permissions';
1011
function installFolderPermissions(ctx) {
1112
return fs.access(process.cwd(), constants.R_OK | constants.W_OK).catch(() => {
1213
return Promise.reject(new errors.SystemError({
13-
message: `The current directory is not writable.
14-
Please fix your directory permissions.`,
14+
message: 'The current directory is not writable. Please fix the permissions of your install directory.',
15+
help: `${chalk.green('https://docs.ghost.org/docs/install#section-your-user-must-own-this-directory')}`,
1516
task: taskTitle
1617
}));
1718
}).then(() => {

0 commit comments

Comments
 (0)