[windows] skip 'UNIX only'

# test that the persistent state is only created on demand
exec chezmoi state dump --format=yaml
cmp stdout golden/dump.yaml
! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb

# test that chezmoi apply updates the persistent state
exec chezmoi apply --force
exists $CHEZMOICONFIGDIR/chezmoistate.boltdb

# test that the persistent state records that script was run
exec chezmoi state dump --format=yaml
stdout 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135:
stdout runAt:

# test that chezmoi get-bucket gets a bucket
exec chezmoi state get-bucket --bucket=scriptState
stdout "runAt":

# test that chezmoi delete-bucket deletes a bucket
exec chezmoi state delete-bucket --bucket=scriptState
exec chezmoi state dump --format=yaml
! stdout runAt:

# test that chezmoi state reset removes the persistent state
exec chezmoi --force state reset
! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb

# test that the --persistent-state option sets the persistent state file
exec chezmoi apply --force
stdout script
exec chezmoi apply --force --persistent-state=$CHEZMOICONFIGDIR${/}chezmoistate2.boltdb
exists $CHEZMOICONFIGDIR${/}chezmoistate2.boltdb
stdout script
exec chezmoi state dump --format=yaml --persistent-state=$CHEZMOICONFIGDIR${/}chezmoistate2.boltdb
stdout 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135:
stdout runAt:

-- golden/dump.yaml --
configState: {}
entryState: {}
gitRepoExternalState: {}
scriptState: {}
-- home/user/.local/share/chezmoi/run_once_script.sh --
#!/bin/sh

echo script
