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
Cannot copy from `test.json` to `d:\temp\foo\test.json`:
Cannot write to `d:\temp\foo\test.json`: EEXIST: file already exists, open 'd:\temp\foo\test.json'
Issuing the command without --no-overwrite works fine (but the file is overwritten)
Expected
when setting the --no-overwrite parameter it should continue without error even if the file exists.
My Misunderstanding of purpose?
I found the test for cpy, it appears it is expected that overwrite:false will throw an exception? If so is there any way to 'skip/ignore' existing files similar to how the non async approach appears to work?
test('do not overwrite',asynct=>{fs.mkdirSync(t.context.tmp);fs.writeFileSync(path.join(t.context.tmp,'license'),'');awaitt.throwsAsync(cpy(['license'],t.context.tmp,{overwrite: false}));t.is(read(t.context.tmp,'license'),'');});
EDIT: reading cp-file code, if I understand async copy overwrite false will throw an exception, but sync copy overwrite will not. If that is correct, then this was just a misunderstanding, please close the issue.
The text was updated successfully, but these errors were encountered:
Platform
When I execute
it returns the error
Issuing the command without --no-overwrite works fine (but the file is overwritten)
Expected
when setting the
--no-overwrite
parameter it should continue without error even if the file exists.My Misunderstanding of purpose?
I found the test for cpy, it appears it is expected that overwrite:false will throw an exception? If so is there any way to 'skip/ignore' existing files similar to how the non async approach appears to work?
EDIT: reading cp-file code, if I understand async copy overwrite false will throw an exception, but sync copy overwrite will not. If that is correct, then this was just a misunderstanding, please close the issue.
The text was updated successfully, but these errors were encountered: