exec git init
exec git add -A
exec lefthook run skip
! stdout 'Ha-ha!'
exec lefthook run no-skip
stdout 'Ha-ha!'

exec lefthook run skip-var
! stdout 'Ha-ha!'

env VAR=1
exec lefthook run skip-var
stdout 'Ha-ha!'

-- lefthook.yml --
output:
  - execution_out
skip:
  skip:
    - run: test 1 -eq 1
  commands:
    echo:
      run: echo 'Ha-ha!'

no-skip:
  skip:
    - run: "[ 1 -eq 0 ]"
  commands:
    echo:
      run: echo 'Ha-ha!'

skip-var:
  skip:
    - run: test -z $VAR
  commands:
    echo:
      run: echo 'Ha-ha!'
