-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Fix guide on clearing state of run_onchange_ scripts
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[windows] skip 'UNIX only' | ||
|
||
# test that chezmoi runs run_once_ and run_onchange_ scripts only once | ||
exec chezmoi apply | ||
stdout once | ||
stdout onchange | ||
exec chezmoi apply | ||
! stdout . | ||
|
||
# test that chezmoi runs run_once_ scripts after chezmoi state delete-bucket --bucket=scriptState | ||
exec chezmoi state delete-bucket --bucket=scriptState | ||
exec chezmoi apply | ||
stdout once | ||
! stdout onchange | ||
|
||
# test that chezmoi runs run_once_ scripts after chezmoi state delete-bucket --bucket=entryState | ||
exec chezmoi state delete-bucket --bucket=entryState | ||
exec chezmoi apply | ||
! stdout once | ||
stdout onchange | ||
|
||
-- home/user/.local/share/chezmoi/run_once_once.sh -- | ||
#!/bin/sh | ||
|
||
echo once | ||
-- home/user/.local/share/chezmoi/run_onchange_onchange.sh -- | ||
#!/bin/sh | ||
|
||
echo onchange |