Skip to content

Commit 90d8ad8

Browse files
committed
ci(ci): fix bash path conversion for windows node.js directory
- Fix regex that caused double C in drive letter (/cC/) - Use string manipulation instead of regex for reliable conversion - Convert C:\path to /c/path format correctly
1 parent dee8fea commit 90d8ad8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ jobs:
3838
id: node_path
3939
run: |
4040
$nodeDir = (Get-Command node).Source | Split-Path -Parent
41-
$nodeDirBash = "/c" + ($nodeDir -replace ':\\', '/' -replace '\\', '/')
41+
$drive = $nodeDir.Substring(0, 1).ToLower()
42+
$path = $nodeDir.Substring(2).Replace('\', '/')
43+
$nodeDirBash = "/$drive$path"
4244
echo "node_dir=$nodeDir" >> $env:GITHUB_OUTPUT
4345
echo "node_dir_bash=$nodeDirBash" >> $env:GITHUB_OUTPUT
4446
echo "Windows path: $nodeDir"

0 commit comments

Comments
 (0)