Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean operation failed #19

Closed
wondger opened this issue Feb 19, 2013 · 4 comments
Closed

Clean operation failed #19

wondger opened this issue Feb 19, 2013 · 4 comments

Comments

@wondger
Copy link

wondger commented Feb 19, 2013

"devDependencies": {
"grunt": "~0.4.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-concat": "~0.1.2",
"grunt-contrib-uglify": "~0.1.1",
"grunt-contrib-imagemin": "~0.1.1"
}

Warning: Clean operation failed. Use --force to continue.

Aborted due to warnings.


what's the meaning of warnings?

@tkellen
Copy link
Member

tkellen commented Feb 19, 2013

Can you post the content of your Gruntfile please?

@wondger
Copy link
Author

wondger commented Feb 20, 2013

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        clean: {
            options: {
                force: true
            },
            build: ['build/js/2.0/login']
        }
    });

    // Load plugins
    grunt.loadNpmTasks('grunt-contrib-clean');

    // Default task(s).
    grunt.registerTask('default', ['clean']);

};

tkellen, it looks very simple.

@shama
Copy link
Member

shama commented Mar 5, 2013

@wondger Could you run grunt clean -v --stack and post your output? Your config should work. Thanks!

@shama
Copy link
Member

shama commented Mar 10, 2013

Closing as this works for me. Please see my output below that shows the force option is being passed successfully.

@wondger If you're still running into this issue could you please run grunt clean -v? This enables verbose and will show you the actual error. The error Clean operation failed. occurs whenever grunt.file.delete has failed to delete the given file. Likely a permission issue or something else preventing the file from being deleted. Thanks!

$ grunt clean
Running "clean:short" (clean) task
Cleaning "tmp/sample_short"...{ force: true }
OK

Running "clean:long" (clean) task
Cleaning "tmp/sample_long"...{ force: true }
OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants