Skip to content

Commit 38f7cef

Browse files
committed
fix(ci): robust shell defaults and config path matching in process ownership
1 parent 2cc9aba commit 38f7cef

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
test:
1212
name: Test on ${{ matrix.os }} (Node ${{ matrix.node-version }})
1313
runs-on: ${{ matrix.os }}
14+
defaults:
15+
run:
16+
shell: bash
1417
strategy:
1518
fail-fast: false
1619
matrix:
@@ -50,6 +53,7 @@ jobs:
5053

5154
- name: Build Native Windows Launcher & Verify Arguments (Windows Only)
5255
if: runner.os == 'Windows'
56+
shell: powershell
5357
run: |
5458
powershell -ExecutionPolicy Bypass -File scripts/windows/build-launcher.ps1 -Strict
5559
if (-not (Test-Path "bin/opencode-vpn.exe")) {
@@ -59,6 +63,7 @@ jobs:
5963
6064
- name: Verify Windows Scripts & Packaging (Windows Only)
6165
if: runner.os == 'Windows'
66+
shell: powershell
6267
run: |
6368
powershell -ExecutionPolicy Bypass -File scripts/windows/check-environment.ps1
6469
npm run package:portable
@@ -76,6 +81,7 @@ jobs:
7681
7782
- name: Run Native Windows Release Verification Kit (Windows Only)
7883
if: runner.os == 'Windows'
84+
shell: powershell
7985
run: |
8086
powershell -ExecutionPolicy Bypass -File scripts/windows/verify-release.ps1
8187
Write-Host "Native Windows verification kit passed."

‎src/backend/platform/platform.ts‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -759,10 +759,23 @@ export class Platform {
759759

760760
if (record.configPath) {
761761
const normalizedConfig = path.resolve(record.configPath);
762-
const configArgFound = cmdlineArgs.some(
763-
(arg) => path.resolve(arg) === normalizedConfig || arg.includes(normalizedConfig)
764-
);
765-
if (!configArgFound && !cmdlineJoined.includes(normalizedConfig)) {
762+
const configArgFound = cmdlineArgs.some((arg) => {
763+
try {
764+
return (
765+
path.resolve(arg) === normalizedConfig ||
766+
arg.includes(normalizedConfig) ||
767+
normalizedConfig.includes(arg) ||
768+
arg.includes(path.basename(normalizedConfig))
769+
);
770+
} catch {
771+
return false;
772+
}
773+
});
774+
if (
775+
!configArgFound &&
776+
!cmdlineJoined.includes(normalizedConfig) &&
777+
!cmdlineJoined.includes(record.configPath)
778+
) {
766779
return false;
767780
}
768781
}

0 commit comments

Comments
 (0)