Skip to content

Commit eb1c6ca

Browse files
committed
fix(work-log): recognize PowerShell common parameters
1 parent 3489c6d commit eb1c6ca

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎packages/client-runtime/src/work-log/commandLabel.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ describe("commandProgramName", () => {
240240
["Push-Location C:\\work; node app.js", "node"],
241241
["Start-Process -FilePath node -ArgumentList server.js", "node"],
242242
["Start-Process -ArgumentList '-FilePath helper' node", "node"],
243+
["Start-Process -ErrorAction Stop -FilePath node", "node"],
243244
["Start-Process -NoNewWindow -WorkingDirectory C:\\work node", "node"],
244245
['Start-Process "C:\\Program Files\\Example\\app.exe"', "app.exe"],
245246
['Start-Process -FilePath ".\\dist\\Example App.exe" -PassThru', "Example App.exe"],

‎packages/client-runtime/src/work-log/commandLabel.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,33 @@ const POWERSHELL_OPTIONS_WITH_VALUE = new Set([
2828
]);
2929
const START_PROCESS_FLAGS = new Set([
3030
"-confirm",
31+
"-debug",
3132
"-loaduserprofile",
3233
"-nonewwindow",
3334
"-passthru",
3435
"-usenewenvironment",
36+
"-verbose",
3537
"-wait",
3638
"-whatif",
3739
]);
3840
const START_PROCESS_OPTIONS_WITH_VALUE = new Set([
3941
"-argumentlist",
4042
"-credential",
4143
"-environment",
44+
"-erroraction",
45+
"-errorvariable",
46+
"-informationaction",
47+
"-informationvariable",
48+
"-outbuffer",
49+
"-outvariable",
50+
"-pipelinevariable",
51+
"-progressaction",
4252
"-redirectstandarderror",
4353
"-redirectstandardinput",
4454
"-redirectstandardoutput",
4555
"-verb",
56+
"-warningaction",
57+
"-warningvariable",
4658
"-windowstyle",
4759
"-workingdirectory",
4860
]);

0 commit comments

Comments
 (0)