Skip to content

Commit

Permalink
Merge pull request #1334 from iclanton/ianc/fix-rush-command-line
Browse files Browse the repository at this point in the history
[rush] Fix an issue where custom command-line arguments aren't passed to projects' builds.
  • Loading branch information
iclanton authored Jun 13, 2019
2 parents 9418147 + eac78c1 commit 5aff38f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
3 changes: 3 additions & 0 deletions apps/rush-lib/src/cli/scriptActions/BulkScriptAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export class BulkScriptAction extends BaseScriptAction {

// Collect all custom parameter values
const customParameterValues: string[] = [];
for (const customParameter of this.customParameters) {
customParameter.appendToArgList(customParameterValues);
}

const changedProjectsOnly: boolean = this.actionName === 'build' && this._changedProjectsOnly.value;

Expand Down
23 changes: 11 additions & 12 deletions apps/rush-lib/src/logic/taskRunner/ProjectTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,19 +150,18 @@ export class ProjectTask implements ITaskDefinition {
: taskCommand;

writer.writeLine(normalizedTaskCommand);
const task: child_process.ChildProcess =
Utilities.executeLifecycleCommandAsync(
normalizedTaskCommand,
{
rushConfiguration: this._rushConfiguration,
workingDirectory: projectFolder,
initCwd: this._rushConfiguration.commonTempFolder,
handleOutput: true,
environmentPathOptions: {
includeProjectBin: true
}
const task: child_process.ChildProcess = Utilities.executeLifecycleCommandAsync(
normalizedTaskCommand,
{
rushConfiguration: this._rushConfiguration,
workingDirectory: projectFolder,
initCwd: this._rushConfiguration.commonTempFolder,
handleOutput: true,
environmentPathOptions: {
includeProjectBin: true
}
);
}
);

// Hook into events, in order to get live streaming of build log
task.stdout.on('data', (data: string) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "Fix an issue where custom command-line parameters weren't passed to projects' builds.",
"packageName": "@microsoft/rush",
"type": "none"
}
],
"packageName": "@microsoft/rush",
"email": "[email protected]"
}
2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"policyName": "rush",
"definitionName": "lockStepVersion",
"version": "5.9.0",
"nextBump": "minor",
"nextBump": "patch",
"mainProject": "@microsoft/rush"
}
]

0 comments on commit 5aff38f

Please sign in to comment.