Skip to content

Commit

Permalink
Correctly interpret options.clobber.
Browse files Browse the repository at this point in the history
--no-clobber results in options.clobber being
false.

Fixes dthree#97.
  • Loading branch information
tituomin committed Aug 31, 2016
1 parent ba47fe6 commit 0015ea7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/cp.js
Expand Up @@ -19,7 +19,7 @@ const cp = {
args = (Array.isArray(args)) ? args : args.split(' ');
args = args.filter(arg => String(arg).trim() !== '');

options.noclobber = (options.force === true) ? false : options.noclobber;
options.noclobber = (options.force === true) ? false : !options.clobber;
options.recursive = (options.R === true) ? true : options.recursive;

if (args.length < 1) {
Expand Down

0 comments on commit 0015ea7

Please sign in to comment.