Verified Commit f54a668f authored by Aral Balkan's avatar Aral Balkan
Browse files

Closes #85: display explanation and fix for rsync error 12

parent dba822ad
......@@ -26,6 +26,8 @@ This release implements a lot of small improvements, some of which have been lon
- Displays a graceful error message if an attempt is made to serve a file instead of a directory (#208).
- Displays explanation of rsync error 12 along with advice for solving it (#85).
#### Security:
- Site.js will now refuse to serve the root or home directory for security reasons (#178).
......
......@@ -94,6 +94,15 @@ function sync (options) {
const errorMessage = _[errorCode]
if (typeof errorMessage !== 'undefined') {
console.log(`\n ❌ ${clr('❨site.js❩ Error:', 'red')} ${errorCode} (${errorMessage})\n`)
// This is a cryptic error that most likely signals that
// rsync is not installed on the server. Let the person know.
if (errorCode === '12') {
console.log(` ${clr('This is most likely because you don’t have rsync installed on your server.', 'yellow')}\n`)
console.log(` You can have it installed automatically by running your daemon with:`)
console.log(` ${clr('site enable', 'green')} ${clr('--ensure-can-sync', 'cyan')}\n`)
}
process.exit(1)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment