Skip to content

Commit

Permalink
checking windows section in testscript
Browse files Browse the repository at this point in the history
  • Loading branch information
prog-supdex committed Mar 12, 2024
1 parent dc3cf4d commit a27cd6d
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions testdata/skip_run.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ exec lefthook run skip
! stdout 'Ha-ha!'
exec lefthook run no-skip
stdout 'Ha-ha!'
exec lefthook run skip-var
! stdout 'Ha-ha!'

[unix] exec lefthook run skip-var
! stdout 'Ha-ha!'
[windows] exec lefthook run skip-var-windows
! stdout 'Ha-ha!'

env VAR=1
exec lefthook run skip-var
stdout 'Ha-ha!'
[unix] exec lefthook run skip-var
stdout 'Ha-ha!'
[windows] exec lefthook run skip-var-windows
stdout 'Ha-ha!'

-- lefthook.yml --
skip_output:
Expand Down Expand Up @@ -36,3 +42,10 @@ skip-var:
commands:
echo:
run: echo 'Ha-ha!'

skip-var-windows:
skip:
- run: if (-not $env:VAR) { exit 1 } else { exit 0 }
commands:
echo:
run: echo 'Ha-ha!'

0 comments on commit a27cd6d

Please sign in to comment.