Skip to content

Commit faeb12d

Browse files
Copilotfedejeanne
andcommitted
Simplify WSL detection in verify.sh (use single grep -E alternation)
Agent-Logs-Url: https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/sessions/eb1d08ac-8aac-4de0-a889-9254eed0953a Co-authored-by: fedejeanne <2205684+fedejeanne@users.noreply.github.com>
1 parent da4a30f commit faeb12d

File tree

1 file changed

+1
-2
lines changed
  • products/eclipse-junit-tests/src/main/scripts/verify

1 file changed

+1
-2
lines changed

products/eclipse-junit-tests/src/main/scripts/verify/verify.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ open_in_browser() {
8585
local file="$1"
8686

8787
# WSL: use Windows explorer / default browser via wslview or explorer.exe
88-
if grep -qi microsoft /proc/version 2>/dev/null || \
89-
grep -qi wsl /proc/version 2>/dev/null; then
88+
if grep -qiE '(microsoft|wsl)' /proc/version 2>/dev/null; then
9089
# Convert the Linux path to a Windows path
9190
local win_path
9291
win_path="$(wslpath -w "$file" 2>/dev/null || echo "")"

0 commit comments

Comments
 (0)