Skip to content

Commit 534b690

Browse files
committed
Avoid drive replacement of the input path variables.
1 parent 7251639 commit 534b690

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/parse_input_paths.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ $work_space_path = & "$getVariable" -defaultVal "$githubWorkSpace" -setVal "$wor
1414
$mapping_path = & "$getVariable" -defaultVal "$work_space_path" -setVal "$mappingPath";
1515
$work_path = & "$getVariable" -defaultVal "$mapping_path" -setVal "$workPath";
1616

17-
& "$setoutputVariable" -name workspace_path -val "$work_space_path";
18-
& "$setoutputVariable" -name mapping_path -val "$mapping_path";
19-
& "$setoutputVariable" -name work_path -val "$work_path";
17+
& "$setoutputVariable" -replace "" -name workspace_path -val "$work_space_path";
18+
& "$setoutputVariable" -replace "" -name mapping_path -val "$mapping_path";
19+
& "$setoutputVariable" -replace "" -name work_path -val "$work_path";

src/set_output_variable.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
# set github output with name and value
33
param (
44
$name,
5-
$val = '@'
5+
$val = '@',
6+
$replace = 'D:',
7+
$with = 'C:'
68
)
79

810
$invovationPath = "$PSScriptRoot";
911
$trimArg = "$invovationPath" + "\trim_arg.ps1";
1012

1113
$trimmed_name = & $trimArg -arg $name;
1214
$trimmed_val = & $trimArg -arg $val;
13-
$trimmed_val = $trimmed_val.replace('D:', 'C:');
15+
if ($replace -ne "") {
16+
$trimmed_val = $trimmed_val.replace($replace, $with);
17+
}
1418

1519
function toGitHub {
1620
param(

0 commit comments

Comments
 (0)