Commit 61e5d54
Fix Permission denied when auto-opening HTML report on macOS/Linux
Start-Process with a file argument on non-Windows PowerShell tries to
execute the file as a binary instead of using the OS file association,
so an .html report (no +x bit) fails with "Permission denied" and the
script exits with a fatal error after the assessment otherwise succeeds.
Use the platform-native opener at the end of the script:
- macOS: & open $htmlReportPath
- Linux: & xdg-open $htmlReportPath
- Windows: Start-Process $htmlReportPath (unchanged)
$IsMacOS / $IsLinux are PowerShell 6+ automatic variables, so this is a
no-op on Windows PowerShell 5.1 where neither evaluates true.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b663b86 commit 61e5d54
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6238 | 6238 | | |
6239 | 6239 | | |
6240 | 6240 | | |
6241 | | - | |
6242 | | - | |
| 6241 | + | |
| 6242 | + | |
| 6243 | + | |
| 6244 | + | |
| 6245 | + | |
| 6246 | + | |
| 6247 | + | |
| 6248 | + | |
| 6249 | + | |
| 6250 | + | |
6243 | 6251 | | |
6244 | 6252 | | |
0 commit comments