Skip to content

"spawn: false" doesn't work #560

@Lalem001

Description

@Lalem001

I cannot get spawn: false to actually work in the current version of grunt-contrib-watch. When a watched file changes, the current watch task will end, and then a new watch will begin immediately. The tasks that I wanted to run never run.

Simplest example I can reliably demonstrate is to have a watch run grunt-eslint, or grunt-karma, on a js file.

I have found that if I insert grunt.task.clearQueue() before grunt.task.run(self.tasks) (taskrun.js#L65) the tasks will execute as expected.

I am wondering if there are any caveats to this potential fix that I may be missing. Should I go ahead and open a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions