Skip to content

Commit 529f3a1

Browse files
committed
Merge pull request #1698 from Microsoft/users/ersciple/m100shellscript
Shell Script specifyWorkingDirectory label and visibleRule.
2 parents 1d336fa + 0aac67f commit 529f3a1

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

Tasks/ShellScript/Strings/resources.resjson/en-US/resources.resjson

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"loc.input.help.scriptPath": "Relative path from repo root of the shell script file to run.",
99
"loc.input.label.args": "Arguments",
1010
"loc.input.help.args": "Arguments passed to the shell script",
11-
"loc.input.label.cwd": "Working Directory",
12-
"loc.input.help.cwd": "Current working directory when script is run. Defaults to the folder where the script is located.",
13-
"loc.input.label.disableAutoCwd": "Disable Auto CWD",
11+
"loc.input.label.disableAutoCwd": "Specify Working Directory",
1412
"loc.input.help.disableAutoCwd": "The default behavior is to set the working directory to the script location. This enables you to optionally specify a different working directory.",
13+
"loc.input.label.cwd": "Working Directory",
14+
"loc.input.help.cwd": "Current working directory when script is run. Defaults to the $(System.DefaultWorkingDirectory).",
1515
"loc.input.label.failOnStandardError": "Fail on Standard Error",
1616
"loc.input.help.failOnStandardError": "If this is true, this task will fail if any errors are written to the StandardError stream.",
1717
"loc.messages.BashReturnCode": "Bash exited with return code: %d",

Tasks/ShellScript/task.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,25 @@
4343
"required": false,
4444
"helpMarkDown": "Arguments passed to the shell script"
4545
},
46-
{
47-
"name": "cwd",
48-
"type": "filePath",
49-
"label": "Working Directory",
50-
"defaultValue": "",
51-
"required": false,
52-
"helpMarkDown": "Current working directory when script is run. Defaults to the folder where the script is located.",
53-
"groupName": "advanced"
54-
},
5546
{
5647
"name": "disableAutoCwd",
5748
"type": "boolean",
58-
"label": "Disable Auto CWD",
49+
"label": "Specify Working Directory",
5950
"defaultValue": "false",
6051
"required": false,
6152
"helpMarkDown": "The default behavior is to set the working directory to the script location. This enables you to optionally specify a different working directory.",
6253
"groupName": "advanced"
6354
},
55+
{
56+
"name": "cwd",
57+
"type": "filePath",
58+
"label": "Working Directory",
59+
"defaultValue": "",
60+
"required": false,
61+
"visibleRule": "disableAutoCwd = true",
62+
"helpMarkDown": "Current working directory when script is run. Defaults to the $(System.DefaultWorkingDirectory).",
63+
"groupName": "advanced"
64+
},
6465
{
6566
"name": "failOnStandardError",
6667
"type": "boolean",

Tasks/ShellScript/task.loc.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@
4343
"required": false,
4444
"helpMarkDown": "ms-resource:loc.input.help.args"
4545
},
46-
{
47-
"name": "cwd",
48-
"type": "filePath",
49-
"label": "ms-resource:loc.input.label.cwd",
50-
"defaultValue": "",
51-
"required": false,
52-
"helpMarkDown": "ms-resource:loc.input.help.cwd",
53-
"groupName": "advanced"
54-
},
5546
{
5647
"name": "disableAutoCwd",
5748
"type": "boolean",
@@ -61,6 +52,16 @@
6152
"helpMarkDown": "ms-resource:loc.input.help.disableAutoCwd",
6253
"groupName": "advanced"
6354
},
55+
{
56+
"name": "cwd",
57+
"type": "filePath",
58+
"label": "ms-resource:loc.input.label.cwd",
59+
"defaultValue": "",
60+
"required": false,
61+
"visibleRule": "disableAutoCwd = true",
62+
"helpMarkDown": "ms-resource:loc.input.help.cwd",
63+
"groupName": "advanced"
64+
},
6465
{
6566
"name": "failOnStandardError",
6667
"type": "boolean",

0 commit comments

Comments
 (0)