Skip to content

Commit 7e6121b

Browse files
committed
fix: update Taskfile.yml with correct platform detection syntax
1 parent d615ea5 commit 7e6121b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Taskfile.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,15 @@ tasks:
6767

6868
coverage:view:
6969
desc: Open coverage report in default browser
70-
platforms:
71-
windows:
72-
cmds:
73-
- cmd.exe /c start {{.COVERAGE_DIR}}/index.html
74-
darwin:
75-
cmds:
76-
- open {{.COVERAGE_DIR}}/index.html
77-
linux:
78-
cmds:
79-
- xdg-open {{.COVERAGE_DIR}}/index.html
70+
cmds:
71+
- |
72+
{{if eq OS "windows"}}
73+
cmd.exe /c start {{.COVERAGE_DIR}}/index.html
74+
{{else if eq OS "darwin"}}
75+
open {{.COVERAGE_DIR}}/index.html
76+
{{else}}
77+
xdg-open {{.COVERAGE_DIR}}/index.html
78+
{{end}}
8079
8180
tools:install:
8281
desc: Install required dotnet tools

0 commit comments

Comments
 (0)