forked from twpayne/chezmoi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editconfig.txt
26 lines (22 loc) · 835 Bytes
/
editconfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# test that edit-config creates a config file if needed
chezmoi edit-config
grep -count=1 '# edited' ${CHEZMOICONFIGDIR}${/}chezmoi.toml
# test that edit-config edits an existing config file
chezmoi edit-config
grep -count=2 '# edited' ${CHEZMOICONFIGDIR}${/}chezmoi.toml
# test that edit-config edits an existing YAML config file
chhome home2${/}user
chezmoi edit-config
grep -count=1 '# edited' $HOME${/}.config${/}chezmoi${/}chezmoi.yaml
# test that edit-config reports a warning if the config is no longer valid
chhome home3${/}user
chezmoi verify
! stderr warning
chezmoi edit-config
stderr warning
grep -count=1 '# edited' $HOME${/}.config${/}chezmoi${/}chezmoi.json
-- home2/user/.config/chezmoi/chezmoi.yaml --
data:
email: "user@home.org"
-- home3/user/.config/chezmoi/chezmoi.json --
{"data":{"email":"user@home.org"}}