Closed dschmidt closed 8 years ago
Sorry, I've been away with some family issues. I'll have a patch that you can test shortly.
Don't worry, I'm glad you agree it's a bug :+1:
I just wasn't sure it wasn't desired behavior, or how you wanted it to be fixed, thus I did not send a PR directly. If you fix, even better :beers:
I have a fix locally, I'm just writing the tests for it now. I'll push it to master without publishing so you can test it to confirm that it behaves as you wanted.
GH closed it as I pushed up the fix. Can you try master and see if that works as you expect it to? If it does then I'll publish this as 1.0.0
.
Nice! Will test when back from dinner
Works, great!
Cool, published as cpr@1.0.0
.
Yay, so is ember-cli-deploy-cp@0.3.0 ;-)
Thanks for taking care of this so quickly :beer:
:+1: Thanks for the fix
Always glad to help! :beers:
Hey,
cpr
removes dirs if they already exist, ifoverwrite:true
is specified in options (which I assumed was just the same as-f
).So for a
test.js
which contains this:I see this behavior:
whereas
cp -R -f
does the following:and without
overwrite: true
it fails on the already existingassets/
dir (and possibly other already existing files). So right now there seems to be no way to merge to directory trees withcpr
. ... or am I overlooking anything?AFAICT this is the code causing this behavior: https://github.com/davglass/cpr/blob/master/lib/index.js#L113
Why was that code added in the first place?
BR, Domme