Fix bug handling of build command

We were taking the commands expanded from the build targets and placing
them at the end of the queue. That caused a problem whereby the
prevailing output folder was always the last one in the command token
list.

Now we splice the new commands into the command token list at the
current position.
This commit is contained in:
Jermolene 2014-06-24 12:09:10 +01:00
parent e018d8e0ef
commit 5b3b62f93d
1 changed files with 4 additions and 1 deletions

View File

@ -33,7 +33,10 @@ var Commander = function(commandTokens,callback,wiki,streams) {
Add a string of tokens to the command queue
*/
Commander.prototype.addCommandTokens = function(commandTokens) {
Array.prototype.push.apply(this.commandTokens,commandTokens);
var params = commandTokens.slice(0);
params.unshift(0);
params.unshift(this.nextToken);
Array.prototype.splice.apply(this.commandTokens,params);
};
/*