diff --git a/index.js b/index.js index 8c7f77a..5df52a6 100644 --- a/index.js +++ b/index.js @@ -51,7 +51,7 @@ module.exports = (source, destination, options = {}) => { } if (files.length === 0) { - throw new CpyError(`Cannot copy \`${source}\`: no files found`); + throw new CpyError(`Cannot copy \`${source}\`: the file doesn't exist`); } const fileProgressHandler = event => { diff --git a/readme.md b/readme.md index c06a349..509f199 100644 --- a/readme.md +++ b/readme.md @@ -36,6 +36,7 @@ const cpy = require('cpy'); ### cpy(source, destination, options?) Returns a `Promise` with the destination file paths. +If the file does not exist, an error will be thrown. #### source