Skip to content

Commit 4e5ceb8

Browse files
committed
Rename "scriptPath" to "shellCommand"
1 parent 5de3151 commit 4e5ceb8

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

apps/rush-lib/src/api/CommandLineJson.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface IBulkCommandJson extends IBaseCommandJson {
2525
*/
2626
export interface IGlobalCommandJson extends IBaseCommandJson {
2727
commandKind: 'global';
28-
scriptPath: string;
28+
shellCommand: string;
2929
}
3030

3131
export type CommandJson = IBulkCommandJson | IGlobalCommandJson;

apps/rush-lib/src/cli/RushCommandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export class RushCommandLineParser extends CommandLineParser {
189189
parser: this,
190190
commandLineConfiguration: commandLineConfiguration,
191191

192-
scriptPath: command.scriptPath
192+
shellCommand: command.shellCommand
193193
}));
194194
break;
195195
default:

apps/rush-lib/src/cli/scriptActions/GlobalScriptAction.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { AlreadyReportedError } from '../../../lib/utilities/AlreadyReportedErro
1313
* Constructor parameters for GlobalScriptAction.
1414
*/
1515
export interface IGlobalScriptActionOptions extends IBaseScriptActionOptions {
16-
scriptPath: string;
16+
shellCommand: string;
1717
}
1818

1919
/**
@@ -27,13 +27,13 @@ export interface IGlobalScriptActionOptions extends IBaseScriptActionOptions {
2727
* invoke scripts from package.json in the same way as a custom command.
2828
*/
2929
export class GlobalScriptAction extends BaseScriptAction {
30-
private _scriptPath: string;
30+
private _shellCommand: string;
3131

3232
constructor(
3333
options: IGlobalScriptActionOptions
3434
) {
3535
super(options);
36-
this._scriptPath = options.scriptPath;
36+
this._shellCommand = options.shellCommand;
3737
}
3838

3939
public run(): Promise<void> {
@@ -50,7 +50,7 @@ export class GlobalScriptAction extends BaseScriptAction {
5050
customParameter.appendToArgList(customParameterValues);
5151
}
5252

53-
let shellCommand: string = this._scriptPath;
53+
let shellCommand: string = this._shellCommand;
5454
if (customParameterValues.length > 0) {
5555
shellCommand += ' ' + customParameterValues.join(' ');
5656
}

apps/rush-lib/src/cli/test/repo/common/config/rush/command-line.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"commandKind": "global",
1313
"summary": "Deploys the build",
1414
"description": "Uploads all the built assets to the CDN",
15-
"scriptPath": "node common/scripts/deploy.js"
15+
"shellCommand": "node common/scripts/deploy.js"
1616
}
1717
],
1818

apps/rush-lib/src/schemas/command-line.schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@
9494
{
9595
"type": "object",
9696
"additionalProperties": true,
97-
"required": [ "scriptPath" ],
97+
"required": [ "shellCommand" ],
9898
"properties": {
9999
"commandKind": {
100100
"enum": [ "global" ]
101101
},
102-
"scriptPath": {
103-
"title": "Script Path",
104-
"description": "The relative path to a JavaScript file that will be invoked using the NodeJS engine. The path is relative to the repository root folder that contains rush.json.",
102+
"shellCommand": {
103+
"title": "Shell Command",
104+
"description": "A command that that will be invoked using the OS shell. The working directory will be the folder that contains rush.json. Additional command-line parameters may be appended to the end of this string.",
105105
"type": "string"
106106
}
107107
}
@@ -115,7 +115,7 @@
115115
"summary": { "$ref": "#/definitions/anything" },
116116
"description": { "$ref": "#/definitions/anything" },
117117

118-
"scriptPath": { "$ref": "#/definitions/anything" }
118+
"shellCommand": { "$ref": "#/definitions/anything" }
119119
}
120120
}
121121
]

0 commit comments

Comments
 (0)