reputationdefender / grunt-clean

grunt task to remove previously generated files and directories
MIT License
11 stars 6 forks source link

Running clean twice causes error: "path to be cleaned is outside the current working directory" #1

Closed rdworth closed 12 years ago

rdworth commented 12 years ago

The clean task should not fail if there is nothing to clean (because the previous run was successful). Encountering this error with the latest version in npm, 0.2.1 and also, 0.2.0. Issue not present with v0.1.0

Expected

> rm -rf dist
> mkdir dist
> touch dist/foo
> grunt clean
Running "clean:folder" (clean) task
Folder "dist/" contents removed.

Done, without errors.

> grunt clean
Running "clean:folder" (clean) task
Folder "dist/" contents removed.

Done, without errors.

Actual

> rm -rf dist
> mkdir dist
> touch dist/foo
> grunt clean
Running "clean:folder" (clean) task
Folder "dist/" contents removed.

Done, without errors.
> grunt clean
Running "clean:folder" (clean) task
<WARN> path to be cleaned is outside the current working directory Use --force to continue. </WARN>

Aborted due to warnings.

This is side-stepped by 364f30c15b9c595a85cdee81e14ff633c7c78d6e but as that's not yet in an npm-released version, it makes the latest version of this task unusable.

maxbeatty commented 12 years ago

revved npm to 0.3.0 which is now available http://search.npmjs.org/#/grunt-clean

If you are preparing a package.json to fetch this, you could always source it directly from GitHub to get the latest.

"grunt-clean": "git+ssh://git@github.com:reputation/grunt-clean.git",