You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #456 Display a warning when calling "copyFiles" with an invalid path (Lyrkan)
This PR was squashed before being merged into the master branch (closes#456).
Discussion
----------
Display a warning when calling "copyFiles" with an invalid path
This PR adds a warning when `copyFiles()` is called with a `from` value that isn't an existing directory.
This is kind of related to #445 but even if the friendly-errors-webpack-plugin worked properly in this case the origin of the error would probably not be obvious (it'd most likely contain a reference to the temporary entry).
Commits
-------
5161d30 Display a different warning when trying to copy from an unexisting directory or an invalid one
8cb9d4a Display a warning when calling "copyFiles" with an invalid path
logger.warning(`The "from" option of copyFiles() should be set to an existing directory but "${entry.from}" does not seem to exist. Nothing will be copied for this copyFiles() config object.`);
159
+
returnfalse;
160
+
}
161
+
162
+
if(!fs.lstatSync(copyFrom).isDirectory()){
163
+
logger.warning(`The "from" option of copyFiles() should be set to an existing directory but "${entry.from}" seems to be a file. Nothing will be copied for this copyFiles() config object.`);
0 commit comments