When using grunt.task.requires('taskname') it will fail when the task actually ran with a target, i.e taskname:targetname.
This is contrary to what I feel is the expected behavior, if I just want to ensure a certain task ran, and don't care about which target of it was used, this will fail.
This is is found in the code in task.js:
// Test to see if all of the given tasks have succeeded.
Task.prototype.requires = function() {
this.parseArgs(arguments).forEach(function(name) {
var success = this._success[name];
if (!success) {
throw new Error('Required task "' + name +
'" ' + (success === false ? 'failed' : 'must be run first') + '.');
}
}.bind(this));
};
Where this._success contains successful tasks but with target names.
When using grunt.task.requires('taskname') it will fail when the task actually ran with a target, i.e taskname:targetname.
This is contrary to what I feel is the expected behavior, if I just want to ensure a certain task ran, and don't care about which target of it was used, this will fail.
This is is found in the code in
task.js:Where
this._successcontains successful tasks but with target names.