isaacs/rimraf

rf flag not working anymore

dhrn opened this issue · 3 comments

dhrn commented

-rf is not working anymore

image

is that expected? if yes please update in the breaking change

Thanks in advance

Same with preserveRoot option. I notice the most recent commit is about bad arguments, maybe it broke something?

  rimraf.sync(path.join(path.resolve(__dirname), "my/path"), {
    preserveRoot: true,
  });
Error: invalid rimraf options
    at assertRimrafOptions (.../node_modules/rimraf/src/index.ts:33:11)

-rf issue fixed on dc2fd42. The bin used to do no argument checking, now it throws if you give it an argument it doesn't understand. (Updated changelog, I'd overlooked this breaking change, sorry.)

@drewjenkins That's a separate issue, and much much more of a head slap.

  typeOrUndef(o.preserveRoot, 'boolean') &&
  typeOrUndef(o.preserveRoot, 'number') &&

yeah.

Fixed on 385f86f

dhrn commented

Found the broken usage in the 4.x.x version .

  • rimraf -f
  • rimraf -r

Since this is the major release, ok to have in the breaking change. may be let's update the repo docs.