Skip to content

Commit 827a598

Browse files
authored
Merge pull request #801 from mohamedmansour/mohamedmansour-patch-1
Improve the error messaging for permissions
2 parents ac36261 + 9e14768 commit 827a598

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/lib/start.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ function bin (argv, server) {
122122
app = solid.createServer(argv, server)
123123
} catch (e) {
124124
if (e.code === 'EACCES') {
125-
console.log(colors.red.bold('ERROR'), 'You need root privileges to start on this port')
125+
if (e.syscall === 'mkdir') {
126+
console.log(colors.red.bold('ERROR'), `You need permissions to create '${e.path}' folder`)
127+
} else {
128+
console.log(colors.red.bold('ERROR'), 'You need root privileges to start on this port')
129+
}
126130
return 1
127131
}
128132
if (e.code === 'EADDRINUSE') {

0 commit comments

Comments
 (0)