Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
make:task --constraint default to 'weekdays'. If one does not want a constraint at all, for example if they want it to run every day, there was no way to do this since the code in replaceConstraint simply replaces DummyConstraint with whatever is provided. The documentation didn't
This commit adds an option, "no-constraint", that defaults to "false" and can be provided as true/false, yes/no, 1/0 or can be simply provided as --no-constraint. When this flag is true the DummyConstraint line is removed from the output task file.
The
constraint
default value of 'weekdays' was left in place for backward compatibility.For example:
Default behavior:
crunz make:task -r ls -f daily mytask
Providing anything ("none") for constraint:
crunz make:task -r ls -f daily -c none mytask
After this commit,
--no-constraint
:crunz make:task -r ls -f daily --no-constraint mytask
The tests for the task generator don't check the contents of the file, so I didn't add tests for this specific case.