[windows] skip 'UNIX only'
[!umask:022] skip

chezmoi apply
cmpenv stdout golden/apply

env $=$
chezmoi dump
cmp stdout golden/dump

chezmoi archive --output=archive.tar
exec tar -tf archive.tar
[openbsd] cmp stdout golden/archive-openbsd
[!openbsd] cmp stdout golden/archive

-- golden/apply --
$HOME${/}dir
-- golden/archive --
dir/
dir/script
-- golden/archive-openbsd --
dir
dir/script
-- golden/dump --
{
  "dir": {
    "type": "dir",
    "name": "dir",
    "perm": 493
  },
  "dir/script": {
    "type": "script",
    "name": "dir/script",
    "contents": "#!/bin/sh\n\npwd\n"
  }
}
-- home/user/.local/share/chezmoi/dir/run_script --
#!/bin/sh

pwd
