Does not give error when copying fails
See original GitHub issueNothing happens when I run the following script. I don’t get an error and no files are being produced.
#!/usr/bin/env node --harmony
const copyfiles = require('copyfiles');
const path = require('path');
const RAZOR_PATH = "Microsoft.AspNet.Razor.3.0.0/lib/net45/System.Web.Razor.dll"
const RAZORENG_PATH = "RazorEngine.3.8.2/lib/net45/RazorEngine.dll"
const JSON_PATH = "Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll"
const destination = '.';
const paths = [ RAZOR_PATH, RAZORENG_PATH, JSON_PATH, destination ].map(path.normalize);
const opts = {};
copyfiles(paths, opts, function(err) {
if(err) {
console.error(`Failed copying dependencies: ${paths}`);
process.exit(1);
}
console.log('.NET dependencies copied successfully')
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Fix Unspecified Error When Copying File or Folder ... - EaseUS
If you receive the unspecified error while copying files or folders because the target disk is corrupted or the file is encrypted. You...
Read more >[SOLVED] Copy and Paste Not Working on Windows 10
Copy and paste not working properly on your Windows 10 PC? Here's the real fix! Try these fixes and make your broken copy-paste...
Read more >Unspecified Error When Copying a File Folder in Windows 10
Most of the time, you encounter this error because you don't have the ownership of the file or folder that you are willing...
Read more >How to fix: Error copying file or folder, A device attached to the ...
To do so, go to the Settings menu on your iPhone, scroll down to Photos and then change the 'Transfer to MAC or...
Read more >Files are copied OK, but I get an error?!?
You can see it when you manually select the path. The form is empty by default. I think this is the reason why...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok that makes sense - I think adding a verbose flag, that logs a warning when a glob is not returning files would be sufficient for me - no idea what others think of this approach so…
copyfiles does-not.exist out
did not throw. so I’m here…