[windows] skip 'UNIX only'

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

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

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

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

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

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

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

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

echo script
