==> Building on chiyu ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list ./ .SRCINFO 508 100% 0.00kB/s 0:00:00 508 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=2/4) PKGBUILD 1,809 100% 1.73MB/s 0:00:00 1,809 100% 1.73MB/s 0:00:00 (xfr#2, to-chk=1/4) chezmoi-2.46.1-1.log 192 100% 187.50kB/s 0:00:00 192 100% 187.50kB/s 0:00:00 (xfr#3, to-chk=0/4) sent 1,565 bytes received 100 bytes 3,330.00 bytes/sec total size is 2,509 speedup is 1.51 ==> Patching arch to riscv64... ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l root13 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Locking clean chroot [/var/lib/archbuild/extra-riscv64/root]...done ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [root13]...done ==> Making package: chezmoi 2.46.1-1 (Mon Feb 12 22:12:35 2024) ==> Retrieving sources...  -> Downloading chezmoi-2.46.1.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 58733 0 58733 0 0 38901 0 --:--:-- 0:00:01 --:--:-- 38901 100 1070k 0 1070k 0 0 430k 0 --:--:-- 0:00:02 --:--:-- 1039k 100 2388k 0 2388k 0 0 723k 0 --:--:-- 0:00:03 --:--:-- 1302k ==> Validating source files with sha512sums... chezmoi-2.46.1.tar.gz ... Passed ==> Making package: chezmoi 2.46.1-1 (Mon Feb 12 22:13:10 2024) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (6) New Version Net Change extra/perl-error 0.17029-5 0.04 MiB extra/perl-mailtools 2.21-7 0.10 MiB extra/perl-timedate 2.33-5 0.08 MiB extra/git 2.43.1-1 24.92 MiB extra/go 2:1.22.0-1 206.32 MiB extra/zip 3.0-11 0.49 MiB Total Installed Size: 231.95 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing go... installing perl-error... installing perl-timedate... installing perl-mailtools... installing git... Optional dependencies for git tk: gitk and git gui openssh: ssh transport and crypto perl-libwww: git svn perl-term-readkey: git svn and interactive.singlekey setting perl-io-socket-ssl: git send-email TLS support perl-authen-sasl: git send-email TLS support perl-mediawiki-api: git mediawiki support perl-datetime-format-iso8601: git mediawiki support perl-lwp-protocol-https: git mediawiki https support perl-cgi: gitweb (web interface) support python: git svn & git p4 subversion: git svn org.freedesktop.secrets: keyring credential helper libsecret: libsecret credential helper [installed] installing zip... :: Running post-transaction hooks... (1/1) Warn about old perl modules [?25h==> Retrieving sources...  -> Found chezmoi-2.46.1.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting chezmoi-2.46.1.tar.gz with bsdtar ==> Starting prepare()... ==> Starting build()... ==> Starting check()... ? github.com/twpayne/chezmoi/v2/assets/chezmoi.io/docs [no test files] ? github.com/twpayne/chezmoi/v2/assets/templates [no test files] ? github.com/twpayne/chezmoi/v2/internal/chezmoiassert [no test files] ? github.com/twpayne/chezmoi/v2/internal/chezmoierrors [no test files] ? github.com/twpayne/chezmoi/v2/internal/chezmoimaps [no test files] === RUN TestMain chezmoi version dev --- PASS: TestMain (0.10s) PASS ok github.com/twpayne/chezmoi/v2 4.899s === RUN TestFS --- PASS: TestFS (0.00s) PASS ok github.com/twpayne/chezmoi/v2/assets/chezmoi.io/docs/reference/commands 0.170s === RUN TestNewTar --- PASS: TestNewTar (0.00s) === RUN TestNewZip --- PASS: TestNewZip (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/archivetest 0.322s === RUN TestNewAbsPathFromExtPath === RUN TestNewAbsPathFromExtPath/empty === RUN TestNewAbsPathFromExtPath/file === RUN TestNewAbsPathFromExtPath/tilde === RUN TestNewAbsPathFromExtPath/tilde_home_file === RUN TestNewAbsPathFromExtPath/tilde_home_file_windows abspath_test.go:51: skipping Windows test on UNIX --- PASS: TestNewAbsPathFromExtPath (0.01s) --- PASS: TestNewAbsPathFromExtPath/empty (0.00s) --- PASS: TestNewAbsPathFromExtPath/file (0.00s) --- PASS: TestNewAbsPathFromExtPath/tilde (0.00s) --- PASS: TestNewAbsPathFromExtPath/tilde_home_file (0.00s) --- SKIP: TestNewAbsPathFromExtPath/tilde_home_file_windows (0.00s) === RUN TestAgeEncryption === RUN TestAgeEncryption/age ageencryption_test.go:154: age not found in $PATH === RUN TestAgeEncryption/rage ageencryption_test.go:154: rage not found in $PATH --- PASS: TestAgeEncryption (0.02s) --- SKIP: TestAgeEncryption/age (0.01s) --- SKIP: TestAgeEncryption/rage (0.00s) === RUN TestAgeMultipleIdentitiesAndMultipleRecipients === RUN TestAgeMultipleIdentitiesAndMultipleRecipients/age ageencryption_test.go:154: age not found in $PATH === RUN TestAgeMultipleIdentitiesAndMultipleRecipients/rage ageencryption_test.go:154: rage not found in $PATH --- PASS: TestAgeMultipleIdentitiesAndMultipleRecipients (0.00s) --- SKIP: TestAgeMultipleIdentitiesAndMultipleRecipients/age (0.00s) --- SKIP: TestAgeMultipleIdentitiesAndMultipleRecipients/rage (0.00s) === RUN TestAgeRecipientsFile === RUN TestAgeRecipientsFile/age ageencryption_test.go:154: age not found in $PATH === RUN TestAgeRecipientsFile/rage ageencryption_test.go:154: rage not found in $PATH --- PASS: TestAgeRecipientsFile (0.00s) --- SKIP: TestAgeRecipientsFile/age (0.00s) --- SKIP: TestAgeRecipientsFile/rage (0.00s) === RUN TestBuiltinAgeEncryption === RUN TestBuiltinAgeEncryption/DecryptToFile === RUN TestBuiltinAgeEncryption/EncryptDecrypt === RUN TestBuiltinAgeEncryption/EncryptFile --- PASS: TestBuiltinAgeEncryption (0.02s) --- PASS: TestBuiltinAgeEncryption/DecryptToFile (0.01s) --- PASS: TestBuiltinAgeEncryption/EncryptDecrypt (0.00s) --- PASS: TestBuiltinAgeEncryption/EncryptFile (0.00s) === RUN TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients === RUN TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients/DecryptToFile === RUN TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients/EncryptDecrypt === RUN TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients/EncryptFile --- PASS: TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients (0.04s) --- PASS: TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients/DecryptToFile (0.00s) --- PASS: TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients/EncryptDecrypt (0.00s) --- PASS: TestBuiltinAgeMultipleIdentitiesAndMultipleRecipients/EncryptFile (0.03s) === RUN TestBuiltinAgeRecipientsFile === RUN TestBuiltinAgeRecipientsFile/DecryptToFile === RUN TestBuiltinAgeRecipientsFile/EncryptDecrypt === RUN TestBuiltinAgeRecipientsFile/EncryptFile === RUN TestBuiltinAgeRecipientsFile/DecryptToFile#01 === RUN TestBuiltinAgeRecipientsFile/EncryptDecrypt#01 === RUN TestBuiltinAgeRecipientsFile/EncryptFile#01 --- PASS: TestBuiltinAgeRecipientsFile (0.02s) --- PASS: TestBuiltinAgeRecipientsFile/DecryptToFile (0.00s) --- PASS: TestBuiltinAgeRecipientsFile/EncryptDecrypt (0.00s) --- PASS: TestBuiltinAgeRecipientsFile/EncryptFile (0.00s) --- PASS: TestBuiltinAgeRecipientsFile/DecryptToFile#01 (0.00s) --- PASS: TestBuiltinAgeRecipientsFile/EncryptDecrypt#01 (0.00s) --- PASS: TestBuiltinAgeRecipientsFile/EncryptFile#01 (0.00s) === RUN TestWalkArchive === RUN TestWalkArchive/tar === RUN TestWalkArchive/zip === RUN TestWalkArchive/zip-flat === RUN TestWalkArchive/tar-flat --- PASS: TestWalkArchive (0.04s) --- PASS: TestWalkArchive/tar (0.02s) --- PASS: TestWalkArchive/zip (0.02s) --- PASS: TestWalkArchive/zip-flat (0.00s) --- PASS: TestWalkArchive/tar-flat (0.00s) === RUN TestArchiveReaderSystemTar --- PASS: TestArchiveReaderSystemTar (0.00s) === RUN TestDirAttr --- PASS: TestDirAttr (0.03s) === RUN TestDirAttrLiteral === RUN TestDirAttrLiteral/exact_dir === RUN TestDirAttrLiteral/literal_exact_dir === RUN TestDirAttrLiteral/literal_literal_dir --- PASS: TestDirAttrLiteral (0.00s) --- PASS: TestDirAttrLiteral/exact_dir (0.00s) --- PASS: TestDirAttrLiteral/literal_exact_dir (0.00s) --- PASS: TestDirAttrLiteral/literal_literal_dir (0.00s) === RUN TestFileAttr --- PASS: TestFileAttr (0.20s) === RUN TestFileAttrEncryptedSuffix --- PASS: TestFileAttrEncryptedSuffix (0.00s) === RUN TestFileAttrLiteral === RUN TestFileAttrLiteral/dot_file === RUN TestFileAttrLiteral/literal_dot_file === RUN TestFileAttrLiteral/literal_literal_file === RUN TestFileAttrLiteral/run_once_script === RUN TestFileAttrLiteral/run_literal_once_script === RUN TestFileAttrLiteral/file.literal === RUN TestFileAttrLiteral/file.literal.literal === RUN TestFileAttrLiteral/file.tmpl === RUN TestFileAttrLiteral/file.tmpl.literal === RUN TestFileAttrLiteral/file.tmpl.literal.tmpl --- PASS: TestFileAttrLiteral (0.00s) --- PASS: TestFileAttrLiteral/dot_file (0.00s) --- PASS: TestFileAttrLiteral/literal_dot_file (0.00s) --- PASS: TestFileAttrLiteral/literal_literal_file (0.00s) --- PASS: TestFileAttrLiteral/run_once_script (0.00s) --- PASS: TestFileAttrLiteral/run_literal_once_script (0.00s) --- PASS: TestFileAttrLiteral/file.literal (0.00s) --- PASS: TestFileAttrLiteral/file.literal.literal (0.00s) --- PASS: TestFileAttrLiteral/file.tmpl (0.00s) --- PASS: TestFileAttrLiteral/file.tmpl.literal (0.00s) --- PASS: TestFileAttrLiteral/file.tmpl.literal.tmpl (0.00s) === RUN TestFileAttrPerm --- PASS: TestFileAttrPerm (0.01s) === RUN TestAutoTemplate === RUN TestAutoTemplate/simple === RUN TestAutoTemplate/longest_first === RUN TestAutoTemplate/alphabetical_first === RUN TestAutoTemplate/nested_values === RUN TestAutoTemplate/only_replace_words === RUN TestAutoTemplate/longest_match_first === RUN TestAutoTemplate/longest_match_first_prefix === RUN TestAutoTemplate/longest_match_first_suffix === RUN TestAutoTemplate/longest_match_first_prefix_and_suffix === RUN TestAutoTemplate/depth_first === RUN TestAutoTemplate/alphabetical_first#01 === RUN TestAutoTemplate/words_only === RUN TestAutoTemplate/words_only_2 === RUN TestAutoTemplate/words_only_3 === RUN TestAutoTemplate/skip_empty === RUN TestAutoTemplate/markers --- PASS: TestAutoTemplate (0.01s) --- PASS: TestAutoTemplate/simple (0.00s) --- PASS: TestAutoTemplate/longest_first (0.00s) --- PASS: TestAutoTemplate/alphabetical_first (0.00s) --- PASS: TestAutoTemplate/nested_values (0.00s) --- PASS: TestAutoTemplate/only_replace_words (0.00s) --- PASS: TestAutoTemplate/longest_match_first (0.00s) --- PASS: TestAutoTemplate/longest_match_first_prefix (0.00s) --- PASS: TestAutoTemplate/longest_match_first_suffix (0.00s) --- PASS: TestAutoTemplate/longest_match_first_prefix_and_suffix (0.00s) --- PASS: TestAutoTemplate/depth_first (0.00s) --- PASS: TestAutoTemplate/alphabetical_first#01 (0.00s) --- PASS: TestAutoTemplate/words_only (0.00s) --- PASS: TestAutoTemplate/words_only_2 (0.00s) --- PASS: TestAutoTemplate/words_only_3 (0.00s) --- PASS: TestAutoTemplate/skip_empty (0.00s) --- PASS: TestAutoTemplate/markers (0.00s) === RUN TestInWord --- PASS: TestInWord (0.00s) === RUN TestBoltPersistentState === RUN TestBoltPersistentState/0 === RUN TestBoltPersistentState/0#01 === RUN TestBoltPersistentState/0#02 --- PASS: TestBoltPersistentState (0.03s) --- PASS: TestBoltPersistentState/0 (0.00s) --- PASS: TestBoltPersistentState/0#01 (0.00s) --- PASS: TestBoltPersistentState/0#02 (0.00s) === RUN TestBoltPersistentStateMock --- PASS: TestBoltPersistentStateMock (0.01s) === RUN TestBoltPersistentStateGeneric --- PASS: TestBoltPersistentStateGeneric (0.01s) === RUN TestBoltPersistentStateReadOnly --- PASS: TestBoltPersistentStateReadOnly (0.00s) === RUN TestEtcHostsFQDNHostname === RUN TestEtcHostsFQDNHostname/etc_hosts === RUN TestEtcHostsFQDNHostname/etc_hosts_loopback_ipv4 === RUN TestEtcHostsFQDNHostname/etc_hosts_loopback_ipv4_localhost_dot_localdomain === RUN TestEtcHostsFQDNHostname/etc_hosts_loopback_ipv6 === RUN TestEtcHostsFQDNHostname/etc_hosts_whitespace_and_comments === RUN TestEtcHostsFQDNHostname/etc_hosts_missing_canonical_hostname === RUN TestEtcHostsFQDNHostname/etc_hosts_kubernetes_docker_internal === RUN TestEtcHostsFQDNHostname/etc_hostname === RUN TestEtcHostsFQDNHostname/etc_myname --- PASS: TestEtcHostsFQDNHostname (0.02s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts (0.01s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts_loopback_ipv4 (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts_loopback_ipv4_localhost_dot_localdomain (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts_loopback_ipv6 (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts_whitespace_and_comments (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts_missing_canonical_hostname (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_hosts_kubernetes_docker_internal (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_hostname (0.00s) --- PASS: TestEtcHostsFQDNHostname/etc_myname (0.00s) === RUN TestUniqueAbbreviations === RUN TestUniqueAbbreviations/#00 === RUN TestUniqueAbbreviations/yes_no_all_quit === RUN TestUniqueAbbreviations/ale_all_abort === RUN TestUniqueAbbreviations/no_now_nope --- PASS: TestUniqueAbbreviations (0.00s) --- PASS: TestUniqueAbbreviations/#00 (0.00s) --- PASS: TestUniqueAbbreviations/yes_no_all_quit (0.00s) --- PASS: TestUniqueAbbreviations/ale_all_abort (0.00s) --- PASS: TestUniqueAbbreviations/no_now_nope (0.00s) === RUN TestUmask --- PASS: TestUmask (0.00s) === RUN TestKernel === RUN TestKernel/windows_services_for_linux === RUN TestKernel/debian_version_only === RUN TestKernel/proc_sys_kernel_missing --- PASS: TestKernel (0.00s) --- PASS: TestKernel/windows_services_for_linux (0.00s) --- PASS: TestKernel/debian_version_only (0.00s) --- PASS: TestKernel/proc_sys_kernel_missing (0.00s) === RUN TestOSRelease === RUN TestOSRelease/archlinux === RUN TestOSRelease/fedora === RUN TestOSRelease/ubuntu --- PASS: TestOSRelease (0.00s) --- PASS: TestOSRelease/archlinux (0.00s) --- PASS: TestOSRelease/fedora (0.00s) --- PASS: TestOSRelease/ubuntu (0.00s) === RUN TestParseOSRelease === RUN TestParseOSRelease/fedora === RUN TestParseOSRelease/ubuntu_with_comments --- PASS: TestParseOSRelease (0.00s) --- PASS: TestParseOSRelease/fedora (0.00s) --- PASS: TestParseOSRelease/ubuntu_with_comments (0.00s) === RUN TestDumpSystem --- PASS: TestDumpSystem (0.02s) === RUN TestXOREncryption === RUN TestXOREncryption/DecryptToFile === RUN TestXOREncryption/EncryptDecrypt === RUN TestXOREncryption/EncryptFile --- PASS: TestXOREncryption (0.00s) --- PASS: TestXOREncryption/DecryptToFile (0.00s) --- PASS: TestXOREncryption/EncryptDecrypt (0.00s) --- PASS: TestXOREncryption/EncryptFile (0.00s) === RUN TestEntryStateEquivalent === RUN TestEntryStateEquivalent/dir1_dir1 === RUN TestEntryStateEquivalent/dir1_copy_dir1 === RUN TestEntryStateEquivalent/dir_private_dir1 === RUN TestEntryStateEquivalent/file1_dir1 === RUN TestEntryStateEquivalent/file1_copy_dir1 === RUN TestEntryStateEquivalent/file2_dir1 === RUN TestEntryStateEquivalent/nil1_dir1 === RUN TestEntryStateEquivalent/nil2_dir1 === RUN TestEntryStateEquivalent/remove_dir1 === RUN TestEntryStateEquivalent/script_dir1 === RUN TestEntryStateEquivalent/symlink_dir1 === RUN TestEntryStateEquivalent/symlink_copy_dir1 === RUN TestEntryStateEquivalent/dir1_dir1_copy === RUN TestEntryStateEquivalent/dir1_copy_dir1_copy === RUN TestEntryStateEquivalent/dir_private_dir1_copy === RUN TestEntryStateEquivalent/file1_dir1_copy === RUN TestEntryStateEquivalent/file1_copy_dir1_copy === RUN TestEntryStateEquivalent/file2_dir1_copy === RUN TestEntryStateEquivalent/nil1_dir1_copy === RUN TestEntryStateEquivalent/nil2_dir1_copy === RUN TestEntryStateEquivalent/remove_dir1_copy === RUN TestEntryStateEquivalent/script_dir1_copy === RUN TestEntryStateEquivalent/symlink_dir1_copy === RUN TestEntryStateEquivalent/symlink_copy_dir1_copy === RUN TestEntryStateEquivalent/dir1_dir_private === RUN TestEntryStateEquivalent/dir1_copy_dir_private === RUN TestEntryStateEquivalent/dir_private_dir_private === RUN TestEntryStateEquivalent/file1_dir_private === RUN TestEntryStateEquivalent/file1_copy_dir_private === RUN TestEntryStateEquivalent/file2_dir_private === RUN TestEntryStateEquivalent/nil1_dir_private === RUN TestEntryStateEquivalent/nil2_dir_private === RUN TestEntryStateEquivalent/remove_dir_private === RUN TestEntryStateEquivalent/script_dir_private === RUN TestEntryStateEquivalent/symlink_dir_private === RUN TestEntryStateEquivalent/symlink_copy_dir_private === RUN TestEntryStateEquivalent/dir1_file1 === RUN TestEntryStateEquivalent/dir1_copy_file1 === RUN TestEntryStateEquivalent/dir_private_file1 === RUN TestEntryStateEquivalent/file1_file1 === RUN TestEntryStateEquivalent/file1_copy_file1 === RUN TestEntryStateEquivalent/file2_file1 === RUN TestEntryStateEquivalent/nil1_file1 === RUN TestEntryStateEquivalent/nil2_file1 === RUN TestEntryStateEquivalent/remove_file1 === RUN TestEntryStateEquivalent/script_file1 === RUN TestEntryStateEquivalent/symlink_file1 === RUN TestEntryStateEquivalent/symlink_copy_file1 === RUN TestEntryStateEquivalent/dir1_file1_copy === RUN TestEntryStateEquivalent/dir1_copy_file1_copy === RUN TestEntryStateEquivalent/dir_private_file1_copy === RUN TestEntryStateEquivalent/file1_file1_copy === RUN TestEntryStateEquivalent/file1_copy_file1_copy === RUN TestEntryStateEquivalent/file2_file1_copy === RUN TestEntryStateEquivalent/nil1_file1_copy === RUN TestEntryStateEquivalent/nil2_file1_copy === RUN TestEntryStateEquivalent/remove_file1_copy === RUN TestEntryStateEquivalent/script_file1_copy === RUN TestEntryStateEquivalent/symlink_file1_copy === RUN TestEntryStateEquivalent/symlink_copy_file1_copy === RUN TestEntryStateEquivalent/dir1_file2 === RUN TestEntryStateEquivalent/dir1_copy_file2 === RUN TestEntryStateEquivalent/dir_private_file2 === RUN TestEntryStateEquivalent/file1_file2 === RUN TestEntryStateEquivalent/file1_copy_file2 === RUN TestEntryStateEquivalent/file2_file2 === RUN TestEntryStateEquivalent/nil1_file2 === RUN TestEntryStateEquivalent/nil2_file2 === RUN TestEntryStateEquivalent/remove_file2 === RUN TestEntryStateEquivalent/script_file2 === RUN TestEntryStateEquivalent/symlink_file2 === RUN TestEntryStateEquivalent/symlink_copy_file2 === RUN TestEntryStateEquivalent/dir1_nil1 === RUN TestEntryStateEquivalent/dir1_copy_nil1 === RUN TestEntryStateEquivalent/dir_private_nil1 === RUN TestEntryStateEquivalent/file1_nil1 === RUN TestEntryStateEquivalent/file1_copy_nil1 === RUN TestEntryStateEquivalent/file2_nil1 === RUN TestEntryStateEquivalent/nil1_nil1 === RUN TestEntryStateEquivalent/nil2_nil1 === RUN TestEntryStateEquivalent/remove_nil1 === RUN TestEntryStateEquivalent/script_nil1 === RUN TestEntryStateEquivalent/symlink_nil1 === RUN TestEntryStateEquivalent/symlink_copy_nil1 === RUN TestEntryStateEquivalent/dir1_nil2 === RUN TestEntryStateEquivalent/dir1_copy_nil2 === RUN TestEntryStateEquivalent/dir_private_nil2 === RUN TestEntryStateEquivalent/file1_nil2 === RUN TestEntryStateEquivalent/file1_copy_nil2 === RUN TestEntryStateEquivalent/file2_nil2 === RUN TestEntryStateEquivalent/nil1_nil2 === RUN TestEntryStateEquivalent/nil2_nil2 === RUN TestEntryStateEquivalent/remove_nil2 === RUN TestEntryStateEquivalent/script_nil2 === RUN TestEntryStateEquivalent/symlink_nil2 === RUN TestEntryStateEquivalent/symlink_copy_nil2 === RUN TestEntryStateEquivalent/dir1_remove === RUN TestEntryStateEquivalent/dir1_copy_remove === RUN TestEntryStateEquivalent/dir_private_remove === RUN TestEntryStateEquivalent/file1_remove === RUN TestEntryStateEquivalent/file1_copy_remove === RUN TestEntryStateEquivalent/file2_remove === RUN TestEntryStateEquivalent/nil1_remove === RUN TestEntryStateEquivalent/nil2_remove === RUN TestEntryStateEquivalent/remove_remove === RUN TestEntryStateEquivalent/script_remove === RUN TestEntryStateEquivalent/symlink_remove === RUN TestEntryStateEquivalent/symlink_copy_remove === RUN TestEntryStateEquivalent/dir1_script === RUN TestEntryStateEquivalent/dir1_copy_script === RUN TestEntryStateEquivalent/dir_private_script === RUN TestEntryStateEquivalent/file1_script === RUN TestEntryStateEquivalent/file1_copy_script === RUN TestEntryStateEquivalent/file2_script === RUN TestEntryStateEquivalent/nil1_script === RUN TestEntryStateEquivalent/nil2_script === RUN TestEntryStateEquivalent/remove_script === RUN TestEntryStateEquivalent/script_script === RUN TestEntryStateEquivalent/symlink_script === RUN TestEntryStateEquivalent/symlink_copy_script === RUN TestEntryStateEquivalent/dir1_symlink === RUN TestEntryStateEquivalent/dir1_copy_symlink === RUN TestEntryStateEquivalent/dir_private_symlink === RUN TestEntryStateEquivalent/file1_symlink === RUN TestEntryStateEquivalent/file1_copy_symlink === RUN TestEntryStateEquivalent/file2_symlink === RUN TestEntryStateEquivalent/nil1_symlink === RUN TestEntryStateEquivalent/nil2_symlink === RUN TestEntryStateEquivalent/remove_symlink === RUN TestEntryStateEquivalent/script_symlink === RUN TestEntryStateEquivalent/symlink_symlink === RUN TestEntryStateEquivalent/symlink_copy_symlink === RUN TestEntryStateEquivalent/dir1_symlink_copy === RUN TestEntryStateEquivalent/dir1_copy_symlink_copy === RUN TestEntryStateEquivalent/dir_private_symlink_copy === RUN TestEntryStateEquivalent/file1_symlink_copy === RUN TestEntryStateEquivalent/file1_copy_symlink_copy === RUN TestEntryStateEquivalent/file2_symlink_copy === RUN TestEntryStateEquivalent/nil1_symlink_copy === RUN TestEntryStateEquivalent/nil2_symlink_copy === RUN TestEntryStateEquivalent/remove_symlink_copy === RUN TestEntryStateEquivalent/script_symlink_copy === RUN TestEntryStateEquivalent/symlink_symlink_copy === RUN TestEntryStateEquivalent/symlink_copy_symlink_copy --- PASS: TestEntryStateEquivalent (0.02s) --- PASS: TestEntryStateEquivalent/dir1_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/file1_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/file2_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/nil1_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/nil2_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/remove_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/script_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_dir1 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/file1_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/file2_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/nil1_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/nil2_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/remove_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/script_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/symlink_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_dir1_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir1_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/file1_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/file2_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/nil1_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/nil2_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/remove_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/script_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/symlink_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_dir_private (0.00s) --- PASS: TestEntryStateEquivalent/dir1_file1 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_file1 (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_file1 (0.00s) --- PASS: TestEntryStateEquivalent/file1_file1 (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_file1 (0.00s) --- PASS: TestEntryStateEquivalent/file2_file1 (0.00s) --- PASS: TestEntryStateEquivalent/nil1_file1 (0.00s) --- PASS: TestEntryStateEquivalent/nil2_file1 (0.00s) --- PASS: TestEntryStateEquivalent/remove_file1 (0.00s) --- PASS: TestEntryStateEquivalent/script_file1 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_file1 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_file1 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/file1_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/file2_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/nil1_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/nil2_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/remove_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/script_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/symlink_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_file1_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir1_file2 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_file2 (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_file2 (0.00s) --- PASS: TestEntryStateEquivalent/file1_file2 (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_file2 (0.00s) --- PASS: TestEntryStateEquivalent/file2_file2 (0.00s) --- PASS: TestEntryStateEquivalent/nil1_file2 (0.00s) --- PASS: TestEntryStateEquivalent/nil2_file2 (0.00s) --- PASS: TestEntryStateEquivalent/remove_file2 (0.00s) --- PASS: TestEntryStateEquivalent/script_file2 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_file2 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_file2 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/file1_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/file2_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/nil1_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/nil2_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/remove_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/script_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_nil1 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/file1_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/file2_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/nil1_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/nil2_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/remove_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/script_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_nil2 (0.00s) --- PASS: TestEntryStateEquivalent/dir1_remove (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_remove (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_remove (0.00s) --- PASS: TestEntryStateEquivalent/file1_remove (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_remove (0.00s) --- PASS: TestEntryStateEquivalent/file2_remove (0.00s) --- PASS: TestEntryStateEquivalent/nil1_remove (0.00s) --- PASS: TestEntryStateEquivalent/nil2_remove (0.00s) --- PASS: TestEntryStateEquivalent/remove_remove (0.00s) --- PASS: TestEntryStateEquivalent/script_remove (0.00s) --- PASS: TestEntryStateEquivalent/symlink_remove (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_remove (0.00s) --- PASS: TestEntryStateEquivalent/dir1_script (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_script (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_script (0.00s) --- PASS: TestEntryStateEquivalent/file1_script (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_script (0.00s) --- PASS: TestEntryStateEquivalent/file2_script (0.00s) --- PASS: TestEntryStateEquivalent/nil1_script (0.00s) --- PASS: TestEntryStateEquivalent/nil2_script (0.00s) --- PASS: TestEntryStateEquivalent/remove_script (0.00s) --- PASS: TestEntryStateEquivalent/script_script (0.00s) --- PASS: TestEntryStateEquivalent/symlink_script (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_script (0.00s) --- PASS: TestEntryStateEquivalent/dir1_symlink (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_symlink (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_symlink (0.00s) --- PASS: TestEntryStateEquivalent/file1_symlink (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_symlink (0.00s) --- PASS: TestEntryStateEquivalent/file2_symlink (0.00s) --- PASS: TestEntryStateEquivalent/nil1_symlink (0.00s) --- PASS: TestEntryStateEquivalent/nil2_symlink (0.00s) --- PASS: TestEntryStateEquivalent/remove_symlink (0.00s) --- PASS: TestEntryStateEquivalent/script_symlink (0.00s) --- PASS: TestEntryStateEquivalent/symlink_symlink (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_symlink (0.00s) --- PASS: TestEntryStateEquivalent/dir1_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir1_copy_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/dir_private_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/file1_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/file1_copy_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/file2_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/nil1_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/nil2_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/remove_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/script_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/symlink_symlink_copy (0.00s) --- PASS: TestEntryStateEquivalent/symlink_copy_symlink_copy (0.00s) === RUN TestIncludeMaskSet === RUN TestIncludeMaskSet/#00 === RUN TestIncludeMaskSet/none === RUN TestIncludeMaskSet/dirs,files === RUN TestIncludeMaskSet/all === RUN TestIncludeMaskSet/all,noscripts === RUN TestIncludeMaskSet/noscripts === RUN TestIncludeMaskSet/noscripts,nosymlinks === RUN TestIncludeMaskSet/symlinks,, === RUN TestIncludeMaskSet/devices --- PASS: TestIncludeMaskSet (0.00s) --- PASS: TestIncludeMaskSet/#00 (0.00s) --- PASS: TestIncludeMaskSet/none (0.00s) --- PASS: TestIncludeMaskSet/dirs,files (0.00s) --- PASS: TestIncludeMaskSet/all (0.00s) --- PASS: TestIncludeMaskSet/all,noscripts (0.00s) --- PASS: TestIncludeMaskSet/noscripts (0.00s) --- PASS: TestIncludeMaskSet/noscripts,nosymlinks (0.00s) --- PASS: TestIncludeMaskSet/symlinks,, (0.00s) --- PASS: TestIncludeMaskSet/devices (0.00s) === RUN TestIncludeMaskStringSlice === RUN TestIncludeMaskStringSlice/all === RUN TestIncludeMaskStringSlice/dirs === RUN TestIncludeMaskStringSlice/files === RUN TestIncludeMaskStringSlice/remove === RUN TestIncludeMaskStringSlice/scripts === RUN TestIncludeMaskStringSlice/symlinks === RUN TestIncludeMaskStringSlice/encrypted === RUN TestIncludeMaskStringSlice/externals === RUN TestIncludeMaskStringSlice/none === RUN TestIncludeMaskStringSlice/dirs,files --- PASS: TestIncludeMaskStringSlice (0.00s) --- PASS: TestIncludeMaskStringSlice/all (0.00s) --- PASS: TestIncludeMaskStringSlice/dirs (0.00s) --- PASS: TestIncludeMaskStringSlice/files (0.00s) --- PASS: TestIncludeMaskStringSlice/remove (0.00s) --- PASS: TestIncludeMaskStringSlice/scripts (0.00s) --- PASS: TestIncludeMaskStringSlice/symlinks (0.00s) --- PASS: TestIncludeMaskStringSlice/encrypted (0.00s) --- PASS: TestIncludeMaskStringSlice/externals (0.00s) --- PASS: TestIncludeMaskStringSlice/none (0.00s) --- PASS: TestIncludeMaskStringSlice/dirs,files (0.00s) === RUN TestEntryTypeSetFlagCompletionFunc === RUN TestEntryTypeSetFlagCompletionFunc/a === RUN TestEntryTypeSetFlagCompletionFunc/e === RUN TestEntryTypeSetFlagCompletionFunc/t === RUN TestEntryTypeSetFlagCompletionFunc/all,nos --- PASS: TestEntryTypeSetFlagCompletionFunc (0.00s) --- PASS: TestEntryTypeSetFlagCompletionFunc/a (0.00s) --- PASS: TestEntryTypeSetFlagCompletionFunc/e (0.00s) --- PASS: TestEntryTypeSetFlagCompletionFunc/t (0.00s) --- PASS: TestEntryTypeSetFlagCompletionFunc/all,nos (0.00s) === RUN TestFindExecutable === RUN TestFindExecutable/FindExecutable_[]string{"yes"}_in_[]string{"/usr/bin",_"/bin"}_as_"/usr/bin/yes" === RUN TestFindExecutable/FindExecutable_[]string{"sh"}_in_[]string{"/bin",_"/usr/bin"}_as_"/bin/sh" === RUN TestFindExecutable/FindExecutable_[]string{"chezmoish"}_in_[]string{"/bin",_"/usr/bin"}_as_"" === RUN TestFindExecutable/FindExecutable_[]string{"chezmoish",_"yes"}_in_[]string{"/usr/bin",_"/bin"}_as_"/usr/bin/yes" === RUN TestFindExecutable/FindExecutable_[]string{"chezmoish",_"sh"}_in_[]string{"/bin",_"/usr/bin"}_as_"/bin/sh" === RUN TestFindExecutable/FindExecutable_[]string{"chezmoish",_"chezvoush"}_in_[]string{"/bin",_"/usr/bin"}_as_"" --- PASS: TestFindExecutable (0.00s) --- PASS: TestFindExecutable/FindExecutable_[]string{"yes"}_in_[]string{"/usr/bin",_"/bin"}_as_"/usr/bin/yes" (0.00s) --- PASS: TestFindExecutable/FindExecutable_[]string{"sh"}_in_[]string{"/bin",_"/usr/bin"}_as_"/bin/sh" (0.00s) --- PASS: TestFindExecutable/FindExecutable_[]string{"chezmoish"}_in_[]string{"/bin",_"/usr/bin"}_as_"" (0.00s) --- PASS: TestFindExecutable/FindExecutable_[]string{"chezmoish",_"yes"}_in_[]string{"/usr/bin",_"/bin"}_as_"/usr/bin/yes" (0.00s) --- PASS: TestFindExecutable/FindExecutable_[]string{"chezmoish",_"sh"}_in_[]string{"/bin",_"/usr/bin"}_as_"/bin/sh" (0.00s) --- PASS: TestFindExecutable/FindExecutable_[]string{"chezmoish",_"chezvoush"}_in_[]string{"/bin",_"/usr/bin"}_as_"" (0.00s) === RUN TestFormatJSONSingleValue --- PASS: TestFormatJSONSingleValue (0.00s) === RUN TestFormats --- PASS: TestFormats (0.00s) === RUN TestFormatRoundTrip === RUN TestFormatRoundTrip/jsonc === RUN TestFormatRoundTrip/json === RUN TestFormatRoundTrip/toml === RUN TestFormatRoundTrip/yaml --- PASS: TestFormatRoundTrip (0.00s) --- PASS: TestFormatRoundTrip/jsonc (0.00s) --- PASS: TestFormatRoundTrip/json (0.00s) --- PASS: TestFormatRoundTrip/toml (0.00s) --- PASS: TestFormatRoundTrip/yaml (0.00s) === RUN TestGPGEncryption gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: keybox '/tmp/TestGPGEncryption3922471609/001/pubring.kbx' created gpg: /tmp/TestGPGEncryption3922471609/001/trustdb.gpg: trustdb created gpg: directory '/tmp/TestGPGEncryption3922471609/001/openpgp-revocs.d' created gpg: revocation certificate stored as '/tmp/TestGPGEncryption3922471609/001/openpgp-revocs.d/F7AD64D594F72C31356170D3527FDC0C1993499A.rev' 2024/02/12 22:22:02 INFO Run cmd="/usr/bin/gpg --batch --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --quick-generate-key chezmoi-test-gpg-key" duration=985.436219ms err= === RUN TestGPGEncryption/asymmetric === RUN TestGPGEncryption/asymmetric/DecryptToFile gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 2024/02/12 22:22:02 INFO Run cmd="/usr/bin/gpg --armor --output /tmp/chezmoi-encryption1177884675/ciphertext --recipient chezmoi-test-gpg-key --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --encrypt /tmp/chezmoi-encryption1177884675/plaintext" duration=82.267625ms err= gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 484C238827CEBB38, created 2024-02-12 "chezmoi-test-gpg-key" 2024/02/12 22:22:03 INFO Run cmd="/usr/bin/gpg --output /tmp/TestGPGEncryptionasymmetricDecryptToFile3960068458/001/plaintext --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --decrypt /tmp/chezmoi-encryption1861871028/ciphertext" duration=421.570472ms err= === RUN TestGPGEncryption/asymmetric/EncryptDecrypt gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! 2024/02/12 22:22:03 INFO Run cmd="/usr/bin/gpg --armor --output /tmp/chezmoi-encryption1737058400/ciphertext --recipient chezmoi-test-gpg-key --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --encrypt /tmp/chezmoi-encryption1737058400/plaintext" duration=38.596356ms err= gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 484C238827CEBB38, created 2024-02-12 "chezmoi-test-gpg-key" 2024/02/12 22:22:03 INFO Run cmd="/usr/bin/gpg --output /tmp/chezmoi-encryption482275142/plaintext --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --decrypt /tmp/chezmoi-encryption482275142/ciphertext" duration=153.675242ms err= === RUN TestGPGEncryption/asymmetric/EncryptFile gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! 2024/02/12 22:22:03 INFO Run cmd="/usr/bin/gpg --armor --output /tmp/chezmoi-encryption487519272/ciphertext --recipient chezmoi-test-gpg-key --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --encrypt /tmp/TestGPGEncryptionasymmetricEncryptFile2958364086/001/plaintext" duration=39.012375ms err= gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 484C238827CEBB38, created 2024-02-12 "chezmoi-test-gpg-key" 2024/02/12 22:22:03 INFO Run cmd="/usr/bin/gpg --output /tmp/chezmoi-encryption3149719541/plaintext --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --decrypt /tmp/chezmoi-encryption3149719541/ciphertext" duration=151.391505ms err= === RUN TestGPGEncryption/symmetric === RUN TestGPGEncryption/symmetric/DecryptToFile gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! 2024/02/12 22:22:03 INFO Run cmd="/usr/bin/gpg --armor --output /tmp/chezmoi-encryption2851390529/ciphertext --symmetric --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback /tmp/chezmoi-encryption2851390529/plaintext" duration=184.081587ms err= gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase 2024/02/12 22:22:04 INFO Run cmd="/usr/bin/gpg --output /tmp/TestGPGEncryptionsymmetricDecryptToFile3665687661/001/plaintext --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --decrypt /tmp/chezmoi-encryption911798644/ciphertext" duration=185.120026ms err= === RUN TestGPGEncryption/symmetric/EncryptDecrypt gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! 2024/02/12 22:22:04 INFO Run cmd="/usr/bin/gpg --armor --output /tmp/chezmoi-encryption73072513/ciphertext --symmetric --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback /tmp/chezmoi-encryption73072513/plaintext" duration=190.02064ms err= gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase 2024/02/12 22:22:04 INFO Run cmd="/usr/bin/gpg --output /tmp/chezmoi-encryption2601015012/plaintext --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --decrypt /tmp/chezmoi-encryption2601015012/ciphertext" duration=185.679665ms err= === RUN TestGPGEncryption/symmetric/EncryptFile gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! 2024/02/12 22:22:04 INFO Run cmd="/usr/bin/gpg --armor --output /tmp/chezmoi-encryption1160962937/ciphertext --symmetric --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback /tmp/TestGPGEncryptionsymmetricEncryptFile3484794706/001/plaintext" duration=189.4629ms err= gpg: WARNING: unsafe permissions on homedir '/tmp/TestGPGEncryption3922471609/001' gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase 2024/02/12 22:22:04 INFO Run cmd="/usr/bin/gpg --output /tmp/chezmoi-encryption183518778/plaintext --homedir /tmp/TestGPGEncryption3922471609/001 --no-tty --passphrase chezmoi-test-gpg-passphrase --pinentry-mode loopback --decrypt /tmp/chezmoi-encryption183518778/ciphertext" duration=191.349938ms err= --- PASS: TestGPGEncryption (3.02s) --- PASS: TestGPGEncryption/asymmetric (0.89s) --- PASS: TestGPGEncryption/asymmetric/DecryptToFile (0.51s) --- PASS: TestGPGEncryption/asymmetric/EncryptDecrypt (0.19s) --- PASS: TestGPGEncryption/asymmetric/EncryptFile (0.19s) --- PASS: TestGPGEncryption/symmetric (1.13s) --- PASS: TestGPGEncryption/symmetric/DecryptToFile (0.37s) --- PASS: TestGPGEncryption/symmetric/EncryptDecrypt (0.38s) --- PASS: TestGPGEncryption/symmetric/EncryptFile (0.38s) === RUN TestHexBytes === RUN TestHexBytes/0 === RUN TestHexBytes/0/json === RUN TestHexBytes/0/yaml === RUN TestHexBytes/1 === RUN TestHexBytes/1/json === RUN TestHexBytes/1/yaml === RUN TestHexBytes/2 === RUN TestHexBytes/2/json === RUN TestHexBytes/2/yaml --- PASS: TestHexBytes (0.00s) --- PASS: TestHexBytes/0 (0.00s) --- PASS: TestHexBytes/0/json (0.00s) --- PASS: TestHexBytes/0/yaml (0.00s) --- PASS: TestHexBytes/1 (0.00s) --- PASS: TestHexBytes/1/json (0.00s) --- PASS: TestHexBytes/1/yaml (0.00s) --- PASS: TestHexBytes/2 (0.00s) --- PASS: TestHexBytes/2/json (0.00s) --- PASS: TestHexBytes/2/yaml (0.00s) === RUN TestMockPersistentState --- PASS: TestMockPersistentState (0.00s) === RUN TestPatternSet === RUN TestPatternSet/empty === RUN TestPatternSet/exact === RUN TestPatternSet/wildcard === RUN TestPatternSet/exclude === RUN TestPatternSet/doublestar --- PASS: TestPatternSet (0.00s) --- PASS: TestPatternSet/empty (0.00s) --- PASS: TestPatternSet/exact (0.00s) --- PASS: TestPatternSet/wildcard (0.00s) --- PASS: TestPatternSet/exclude (0.00s) --- PASS: TestPatternSet/doublestar (0.00s) === RUN TestPatternSetGlob === RUN TestPatternSetGlob/empty === RUN TestPatternSetGlob/simple === RUN TestPatternSetGlob/include_exclude === RUN TestPatternSetGlob/doublestar --- PASS: TestPatternSetGlob (0.01s) --- PASS: TestPatternSetGlob/empty (0.00s) --- PASS: TestPatternSetGlob/simple (0.00s) --- PASS: TestPatternSetGlob/include_exclude (0.00s) --- PASS: TestPatternSetGlob/doublestar (0.00s) === RUN TestRealSystemGlob === RUN TestRealSystemGlob//home/user/foo === RUN TestRealSystemGlob//home/user/**/foo === RUN TestRealSystemGlob//home/user/**/ba* --- PASS: TestRealSystemGlob (0.00s) --- PASS: TestRealSystemGlob//home/user/foo (0.00s) --- PASS: TestRealSystemGlob//home/user/**/foo (0.00s) --- PASS: TestRealSystemGlob//home/user/**/ba* (0.00s) === RUN TestRecursiveMerge --- PASS: TestRecursiveMerge (0.00s) === RUN TestRecursiveMergeCopies --- PASS: TestRecursiveMergeCopies (0.00s) === RUN TestSourceRelPath === RUN TestSourceRelPath/empty === RUN TestSourceRelPath/dir === RUN TestSourceRelPath/exact_dir === RUN TestSourceRelPath/exact_dir_private_dir === RUN TestSourceRelPath/file === RUN TestSourceRelPath/dot_file === RUN TestSourceRelPath/exact_dir_executable_file --- PASS: TestSourceRelPath (0.00s) --- PASS: TestSourceRelPath/empty (0.00s) --- PASS: TestSourceRelPath/dir (0.00s) --- PASS: TestSourceRelPath/exact_dir (0.00s) --- PASS: TestSourceRelPath/exact_dir_private_dir (0.00s) --- PASS: TestSourceRelPath/file (0.00s) --- PASS: TestSourceRelPath/dot_file (0.00s) --- PASS: TestSourceRelPath/exact_dir_executable_file (0.00s) === RUN TestSourceStateAdd === RUN TestSourceStateAdd/dir === RUN TestSourceStateAdd/dir/0 === RUN TestSourceStateAdd/dir/1 === RUN TestSourceStateAdd/dir/0#01 === RUN TestSourceStateAdd/dir/0#02 === RUN TestSourceStateAdd/dir_change_attributes === RUN TestSourceStateAdd/dir_change_attributes/0 === RUN TestSourceStateAdd/dir_change_attributes/0#01 === RUN TestSourceStateAdd/dir_change_attributes/1 === RUN TestSourceStateAdd/dir_change_attributes/0#02 === RUN TestSourceStateAdd/dir_change_attributes/1#01 === RUN TestSourceStateAdd/dir_change_attributes/2 === RUN TestSourceStateAdd/dir_file === RUN TestSourceStateAdd/dir_file/0 === RUN TestSourceStateAdd/dir_file/1 === RUN TestSourceStateAdd/dir_file/0#01 === RUN TestSourceStateAdd/dir_file/1#01 === RUN TestSourceStateAdd/dir_file/2 === RUN TestSourceStateAdd/dir_file_existing_dir === RUN TestSourceStateAdd/dir_file_existing_dir/0 === RUN TestSourceStateAdd/dir_file_existing_dir/1 === RUN TestSourceStateAdd/dir_subdir === RUN TestSourceStateAdd/dir_subdir/0 === RUN TestSourceStateAdd/dir_subdir/1 === RUN TestSourceStateAdd/dir_subdir/0#01 === RUN TestSourceStateAdd/dir_subdir/1#01 === RUN TestSourceStateAdd/dir_subdir/0#02 === RUN TestSourceStateAdd/dir_subdir_file === RUN TestSourceStateAdd/dir_subdir_file/0 === RUN TestSourceStateAdd/dir_subdir_file/1 === RUN TestSourceStateAdd/dir_subdir_file/0#01 === RUN TestSourceStateAdd/dir_subdir_file/0#02 === RUN TestSourceStateAdd/dir_subdir_file/1#01 === RUN TestSourceStateAdd/dir_subdir_file/0#03 === RUN TestSourceStateAdd/dir_subdir_file/1#02 === RUN TestSourceStateAdd/dir_subdir_file/2 === RUN TestSourceStateAdd/dir_subdir_file_existing_dir_subdir === RUN TestSourceStateAdd/dir_subdir_file_existing_dir_subdir/0 === RUN TestSourceStateAdd/dir_subdir_file_existing_dir_subdir/1 === RUN TestSourceStateAdd/dir_readonly_unix === RUN TestSourceStateAdd/dir_readonly_unix/0 === RUN TestSourceStateAdd/dir_readonly_unix/1 === RUN TestSourceStateAdd/empty === RUN TestSourceStateAdd/empty/0 === RUN TestSourceStateAdd/empty_with_empty === RUN TestSourceStateAdd/empty_with_empty/0 === RUN TestSourceStateAdd/empty_with_empty/1 === RUN TestSourceStateAdd/empty_with_empty/2 === RUN TestSourceStateAdd/executable_unix === RUN TestSourceStateAdd/executable_unix/0 === RUN TestSourceStateAdd/executable_unix/1 === RUN TestSourceStateAdd/executable_unix/2 === RUN TestSourceStateAdd/executable_windows sourcestate_test.go:488: skipping Windows test on UNIX === RUN TestSourceStateAdd/create === RUN TestSourceStateAdd/create/0 === RUN TestSourceStateAdd/create/1 === RUN TestSourceStateAdd/create/2 === RUN TestSourceStateAdd/file === RUN TestSourceStateAdd/file/0 === RUN TestSourceStateAdd/file/1 === RUN TestSourceStateAdd/file/2 === RUN TestSourceStateAdd/file_change_attributes === RUN TestSourceStateAdd/file_change_attributes/0 === RUN TestSourceStateAdd/file_change_attributes/1 === RUN TestSourceStateAdd/file_change_attributes/2 === RUN TestSourceStateAdd/file_change_attributes/0#01 === RUN TestSourceStateAdd/file_replace_contents === RUN TestSourceStateAdd/file_replace_contents/0 === RUN TestSourceStateAdd/file_replace_contents/1 === RUN TestSourceStateAdd/file_replace_contents/2 === RUN TestSourceStateAdd/private_unix === RUN TestSourceStateAdd/private_unix/0 === RUN TestSourceStateAdd/private_unix/1 === RUN TestSourceStateAdd/private_unix/2 === RUN TestSourceStateAdd/private_windows sourcestate_test.go:488: skipping Windows test on UNIX === RUN TestSourceStateAdd/file_readonly_unix === RUN TestSourceStateAdd/file_readonly_unix/0 === RUN TestSourceStateAdd/file_readonly_unix/1 === RUN TestSourceStateAdd/file_readonly_unix/2 === RUN TestSourceStateAdd/symlink === RUN TestSourceStateAdd/symlink/0 === RUN TestSourceStateAdd/symlink/1 === RUN TestSourceStateAdd/symlink_backslash_windows sourcestate_test.go:488: skipping Windows test on UNIX === RUN TestSourceStateAdd/template === RUN TestSourceStateAdd/template/0 === RUN TestSourceStateAdd/template/1 === RUN TestSourceStateAdd/template/2 === RUN TestSourceStateAdd/dir_and_dir_file === RUN TestSourceStateAdd/dir_and_dir_file/0 === RUN TestSourceStateAdd/dir_and_dir_file/1 === RUN TestSourceStateAdd/dir_and_dir_file/0#01 === RUN TestSourceStateAdd/dir_and_dir_file/1#01 === RUN TestSourceStateAdd/dir_and_dir_file/2 === RUN TestSourceStateAdd/file_in_dir_exact_subdir === RUN TestSourceStateAdd/file_in_dir_exact_subdir/0 === RUN TestSourceStateAdd/file_in_dir_exact_subdir/1 --- PASS: TestSourceStateAdd (0.10s) --- PASS: TestSourceStateAdd/dir (0.01s) --- PASS: TestSourceStateAdd/dir/0 (0.00s) --- PASS: TestSourceStateAdd/dir/1 (0.00s) --- PASS: TestSourceStateAdd/dir/0#01 (0.00s) --- PASS: TestSourceStateAdd/dir/0#02 (0.00s) --- PASS: TestSourceStateAdd/dir_change_attributes (0.01s) --- PASS: TestSourceStateAdd/dir_change_attributes/0 (0.00s) --- PASS: TestSourceStateAdd/dir_change_attributes/0#01 (0.00s) --- PASS: TestSourceStateAdd/dir_change_attributes/1 (0.00s) --- PASS: TestSourceStateAdd/dir_change_attributes/0#02 (0.00s) --- PASS: TestSourceStateAdd/dir_change_attributes/1#01 (0.00s) --- PASS: TestSourceStateAdd/dir_change_attributes/2 (0.00s) --- PASS: TestSourceStateAdd/dir_file (0.00s) --- PASS: TestSourceStateAdd/dir_file/0 (0.00s) --- PASS: TestSourceStateAdd/dir_file/1 (0.00s) --- PASS: TestSourceStateAdd/dir_file/0#01 (0.00s) --- PASS: TestSourceStateAdd/dir_file/1#01 (0.00s) --- PASS: TestSourceStateAdd/dir_file/2 (0.00s) --- PASS: TestSourceStateAdd/dir_file_existing_dir (0.00s) --- PASS: TestSourceStateAdd/dir_file_existing_dir/0 (0.00s) --- PASS: TestSourceStateAdd/dir_file_existing_dir/1 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir (0.00s) --- PASS: TestSourceStateAdd/dir_subdir/0 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir/1 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir/0#01 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir/1#01 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir/0#02 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file (0.01s) --- PASS: TestSourceStateAdd/dir_subdir_file/0 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/1 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/0#01 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/0#02 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/1#01 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/0#03 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/1#02 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file/2 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file_existing_dir_subdir (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file_existing_dir_subdir/0 (0.00s) --- PASS: TestSourceStateAdd/dir_subdir_file_existing_dir_subdir/1 (0.00s) --- PASS: TestSourceStateAdd/dir_readonly_unix (0.00s) --- PASS: TestSourceStateAdd/dir_readonly_unix/0 (0.00s) --- PASS: TestSourceStateAdd/dir_readonly_unix/1 (0.00s) --- PASS: TestSourceStateAdd/empty (0.00s) --- PASS: TestSourceStateAdd/empty/0 (0.00s) --- PASS: TestSourceStateAdd/empty_with_empty (0.00s) --- PASS: TestSourceStateAdd/empty_with_empty/0 (0.00s) --- PASS: TestSourceStateAdd/empty_with_empty/1 (0.00s) --- PASS: TestSourceStateAdd/empty_with_empty/2 (0.00s) --- PASS: TestSourceStateAdd/executable_unix (0.00s) --- PASS: TestSourceStateAdd/executable_unix/0 (0.00s) --- PASS: TestSourceStateAdd/executable_unix/1 (0.00s) --- PASS: TestSourceStateAdd/executable_unix/2 (0.00s) --- SKIP: TestSourceStateAdd/executable_windows (0.00s) --- PASS: TestSourceStateAdd/create (0.00s) --- PASS: TestSourceStateAdd/create/0 (0.00s) --- PASS: TestSourceStateAdd/create/1 (0.00s) --- PASS: TestSourceStateAdd/create/2 (0.00s) --- PASS: TestSourceStateAdd/file (0.00s) --- PASS: TestSourceStateAdd/file/0 (0.00s) --- PASS: TestSourceStateAdd/file/1 (0.00s) --- PASS: TestSourceStateAdd/file/2 (0.00s) --- PASS: TestSourceStateAdd/file_change_attributes (0.00s) --- PASS: TestSourceStateAdd/file_change_attributes/0 (0.00s) --- PASS: TestSourceStateAdd/file_change_attributes/1 (0.00s) --- PASS: TestSourceStateAdd/file_change_attributes/2 (0.00s) --- PASS: TestSourceStateAdd/file_change_attributes/0#01 (0.00s) --- PASS: TestSourceStateAdd/file_replace_contents (0.00s) --- PASS: TestSourceStateAdd/file_replace_contents/0 (0.00s) --- PASS: TestSourceStateAdd/file_replace_contents/1 (0.00s) --- PASS: TestSourceStateAdd/file_replace_contents/2 (0.00s) --- PASS: TestSourceStateAdd/private_unix (0.00s) --- PASS: TestSourceStateAdd/private_unix/0 (0.00s) --- PASS: TestSourceStateAdd/private_unix/1 (0.00s) --- PASS: TestSourceStateAdd/private_unix/2 (0.00s) --- SKIP: TestSourceStateAdd/private_windows (0.00s) --- PASS: TestSourceStateAdd/file_readonly_unix (0.00s) --- PASS: TestSourceStateAdd/file_readonly_unix/0 (0.00s) --- PASS: TestSourceStateAdd/file_readonly_unix/1 (0.00s) --- PASS: TestSourceStateAdd/file_readonly_unix/2 (0.00s) --- PASS: TestSourceStateAdd/symlink (0.00s) --- PASS: TestSourceStateAdd/symlink/0 (0.00s) --- PASS: TestSourceStateAdd/symlink/1 (0.00s) --- SKIP: TestSourceStateAdd/symlink_backslash_windows (0.00s) --- PASS: TestSourceStateAdd/template (0.01s) --- PASS: TestSourceStateAdd/template/0 (0.00s) --- PASS: TestSourceStateAdd/template/1 (0.00s) --- PASS: TestSourceStateAdd/template/2 (0.00s) --- PASS: TestSourceStateAdd/dir_and_dir_file (0.00s) --- PASS: TestSourceStateAdd/dir_and_dir_file/0 (0.00s) --- PASS: TestSourceStateAdd/dir_and_dir_file/1 (0.00s) --- PASS: TestSourceStateAdd/dir_and_dir_file/0#01 (0.00s) --- PASS: TestSourceStateAdd/dir_and_dir_file/1#01 (0.00s) --- PASS: TestSourceStateAdd/dir_and_dir_file/2 (0.00s) --- PASS: TestSourceStateAdd/file_in_dir_exact_subdir (0.00s) --- PASS: TestSourceStateAdd/file_in_dir_exact_subdir/0 (0.00s) --- PASS: TestSourceStateAdd/file_in_dir_exact_subdir/1 (0.00s) === RUN TestSourceStateAddInExternal 2024/02/12 22:22:04 INFO HTTPRequest duration=7.988091ms method=GET url=http://127.0.0.1:40661/archive.tar statusCode=200 status="200 OK" contentLength=-1 === RUN TestSourceStateAddInExternal/0 === RUN TestSourceStateAddInExternal/1 === RUN TestSourceStateAddInExternal/0#01 === RUN TestSourceStateAddInExternal/1#01 === RUN TestSourceStateAddInExternal/2 --- PASS: TestSourceStateAddInExternal (0.02s) --- PASS: TestSourceStateAddInExternal/0 (0.00s) --- PASS: TestSourceStateAddInExternal/1 (0.00s) --- PASS: TestSourceStateAddInExternal/0#01 (0.00s) --- PASS: TestSourceStateAddInExternal/1#01 (0.00s) --- PASS: TestSourceStateAddInExternal/2 (0.00s) === RUN TestSourceStateApplyAll === RUN TestSourceStateApplyAll/empty === RUN TestSourceStateApplyAll/dir === RUN TestSourceStateApplyAll/dir/0 === RUN TestSourceStateApplyAll/dir/1 === RUN TestSourceStateApplyAll/dir_exact === RUN TestSourceStateApplyAll/dir_exact/0 === RUN TestSourceStateApplyAll/dir_exact/1 === RUN TestSourceStateApplyAll/dir_exact/0#01 === RUN TestSourceStateApplyAll/file === RUN TestSourceStateApplyAll/file/0 === RUN TestSourceStateApplyAll/file/1 === RUN TestSourceStateApplyAll/file/2 === RUN TestSourceStateApplyAll/file_remove_empty === RUN TestSourceStateApplyAll/file_remove_empty/0 === RUN TestSourceStateApplyAll/file_create_empty === RUN TestSourceStateApplyAll/file_create_empty/0 === RUN TestSourceStateApplyAll/file_create_empty/1 === RUN TestSourceStateApplyAll/file_create_empty/2 === RUN TestSourceStateApplyAll/file_template === RUN TestSourceStateApplyAll/file_template/0 === RUN TestSourceStateApplyAll/file_template/1 === RUN TestSourceStateApplyAll/file_template/2 === RUN TestSourceStateApplyAll/create === RUN TestSourceStateApplyAll/create/0 === RUN TestSourceStateApplyAll/create/1 === RUN TestSourceStateApplyAll/create/2 === RUN TestSourceStateApplyAll/create_no_replace === RUN TestSourceStateApplyAll/create_no_replace/0 === RUN TestSourceStateApplyAll/create_no_replace/1 === RUN TestSourceStateApplyAll/create_no_replace/2 === RUN TestSourceStateApplyAll/symlink === RUN TestSourceStateApplyAll/symlink/0 === RUN TestSourceStateApplyAll/symlink/1 === RUN TestSourceStateApplyAll/symlink_template === RUN TestSourceStateApplyAll/symlink_template/0 === RUN TestSourceStateApplyAll/symlink_template/1 --- PASS: TestSourceStateApplyAll (0.08s) --- PASS: TestSourceStateApplyAll/empty (0.00s) --- PASS: TestSourceStateApplyAll/dir (0.01s) --- PASS: TestSourceStateApplyAll/dir/0 (0.00s) --- PASS: TestSourceStateApplyAll/dir/1 (0.00s) --- PASS: TestSourceStateApplyAll/dir_exact (0.01s) --- PASS: TestSourceStateApplyAll/dir_exact/0 (0.00s) --- PASS: TestSourceStateApplyAll/dir_exact/1 (0.00s) --- PASS: TestSourceStateApplyAll/dir_exact/0#01 (0.00s) --- PASS: TestSourceStateApplyAll/file (0.01s) --- PASS: TestSourceStateApplyAll/file/0 (0.00s) --- PASS: TestSourceStateApplyAll/file/1 (0.00s) --- PASS: TestSourceStateApplyAll/file/2 (0.00s) --- PASS: TestSourceStateApplyAll/file_remove_empty (0.01s) --- PASS: TestSourceStateApplyAll/file_remove_empty/0 (0.00s) --- PASS: TestSourceStateApplyAll/file_create_empty (0.01s) --- PASS: TestSourceStateApplyAll/file_create_empty/0 (0.00s) --- PASS: TestSourceStateApplyAll/file_create_empty/1 (0.00s) --- PASS: TestSourceStateApplyAll/file_create_empty/2 (0.00s) --- PASS: TestSourceStateApplyAll/file_template (0.01s) --- PASS: TestSourceStateApplyAll/file_template/0 (0.00s) --- PASS: TestSourceStateApplyAll/file_template/1 (0.00s) --- PASS: TestSourceStateApplyAll/file_template/2 (0.00s) --- PASS: TestSourceStateApplyAll/create (0.01s) --- PASS: TestSourceStateApplyAll/create/0 (0.00s) --- PASS: TestSourceStateApplyAll/create/1 (0.00s) --- PASS: TestSourceStateApplyAll/create/2 (0.00s) --- PASS: TestSourceStateApplyAll/create_no_replace (0.00s) --- PASS: TestSourceStateApplyAll/create_no_replace/0 (0.00s) --- PASS: TestSourceStateApplyAll/create_no_replace/1 (0.00s) --- PASS: TestSourceStateApplyAll/create_no_replace/2 (0.00s) --- PASS: TestSourceStateApplyAll/symlink (0.00s) --- PASS: TestSourceStateApplyAll/symlink/0 (0.00s) --- PASS: TestSourceStateApplyAll/symlink/1 (0.00s) --- PASS: TestSourceStateApplyAll/symlink_template (0.00s) --- PASS: TestSourceStateApplyAll/symlink_template/0 (0.00s) --- PASS: TestSourceStateApplyAll/symlink_template/1 (0.00s) === RUN TestSourceStateExecuteTemplateData === RUN TestSourceStateExecuteTemplateData/line_ending_lf --- PASS: TestSourceStateExecuteTemplateData (0.00s) --- PASS: TestSourceStateExecuteTemplateData/line_ending_lf (0.00s) === RUN TestSourceStateRead === RUN TestSourceStateRead/empty === RUN TestSourceStateRead/dir === RUN TestSourceStateRead/file === RUN TestSourceStateRead/duplicate_target_file === RUN TestSourceStateRead/duplicate_target_dir === RUN TestSourceStateRead/duplicate_target_script === RUN TestSourceStateRead/symlink_with_attr === RUN TestSourceStateRead/symlink_script === RUN TestSourceStateRead/script === RUN TestSourceStateRead/symlink === RUN TestSourceStateRead/file_in_dir === RUN TestSourceStateRead/chezmoiignore === RUN TestSourceStateRead/chezmoiignore_ignore_file === RUN TestSourceStateRead/chezmoiignore_exact_dir === RUN TestSourceStateRead/chezmoiremove === RUN TestSourceStateRead/chezmoiremove_and_ignore === RUN TestSourceStateRead/chezmoiremove_and_ignore_in_subdir === RUN TestSourceStateRead/external === RUN TestSourceStateRead/chezmoitemplates === RUN TestSourceStateRead/chezmoiversion === RUN TestSourceStateRead/chezmoiversion_multiple === RUN TestSourceStateRead/ignore_dir === RUN TestSourceStateRead/ignore_file --- PASS: TestSourceStateRead (0.13s) --- PASS: TestSourceStateRead/empty (0.00s) --- PASS: TestSourceStateRead/dir (0.00s) --- PASS: TestSourceStateRead/file (0.01s) --- PASS: TestSourceStateRead/duplicate_target_file (0.01s) --- PASS: TestSourceStateRead/duplicate_target_dir (0.01s) --- PASS: TestSourceStateRead/duplicate_target_script (0.00s) --- PASS: TestSourceStateRead/symlink_with_attr (0.01s) --- PASS: TestSourceStateRead/symlink_script (0.01s) --- PASS: TestSourceStateRead/script (0.01s) --- PASS: TestSourceStateRead/symlink (0.01s) --- PASS: TestSourceStateRead/file_in_dir (0.01s) --- PASS: TestSourceStateRead/chezmoiignore (0.01s) --- PASS: TestSourceStateRead/chezmoiignore_ignore_file (0.00s) --- PASS: TestSourceStateRead/chezmoiignore_exact_dir (0.00s) --- PASS: TestSourceStateRead/chezmoiremove (0.00s) --- PASS: TestSourceStateRead/chezmoiremove_and_ignore (0.00s) --- PASS: TestSourceStateRead/chezmoiremove_and_ignore_in_subdir (0.00s) --- PASS: TestSourceStateRead/external (0.00s) --- PASS: TestSourceStateRead/chezmoitemplates (0.00s) --- PASS: TestSourceStateRead/chezmoiversion (0.00s) --- PASS: TestSourceStateRead/chezmoiversion_multiple (0.00s) --- PASS: TestSourceStateRead/ignore_dir (0.00s) --- PASS: TestSourceStateRead/ignore_file (0.00s) === RUN TestSourceStateReadExternal === RUN TestSourceStateReadExternal/external_yaml === RUN TestSourceStateReadExternal/external_toml === RUN TestSourceStateReadExternal/external_in_subdir --- PASS: TestSourceStateReadExternal (0.01s) --- PASS: TestSourceStateReadExternal/external_yaml (0.00s) --- PASS: TestSourceStateReadExternal/external_toml (0.00s) --- PASS: TestSourceStateReadExternal/external_in_subdir (0.00s) === RUN TestSourceStateReadScriptsConcurrent === RUN TestSourceStateReadScriptsConcurrent/with_ignore --- PASS: TestSourceStateReadScriptsConcurrent (0.44s) --- PASS: TestSourceStateReadScriptsConcurrent/with_ignore (0.43s) === RUN TestSourceStateReadExternalCache 2024/02/12 22:22:05 INFO HTTPRequest duration=2.109778ms method=GET url=http://127.0.0.1:43159/archive.tar statusCode=200 status="200 OK" contentLength=2048 2024/02/12 22:22:05 INFO HTTPRequest duration=2.368397ms method=GET url=http://127.0.0.1:43159/archive.tar statusCode=200 status="200 OK" contentLength=2048 2024/02/12 22:22:05 INFO HTTPRequest duration=2.530477ms method=GET url=http://127.0.0.1:43159/archive.tar statusCode=200 status="200 OK" contentLength=2048 --- PASS: TestSourceStateReadExternalCache (0.02s) === RUN TestSourceStateTargetRelPaths === RUN TestSourceStateTargetRelPaths/empty === RUN TestSourceStateTargetRelPaths/scripts --- PASS: TestSourceStateTargetRelPaths (0.00s) --- PASS: TestSourceStateTargetRelPaths/empty (0.00s) --- PASS: TestSourceStateTargetRelPaths/scripts (0.00s) === RUN TestTemplateOptionsParseDirectives === RUN TestTemplateOptionsParseDirectives/empty === RUN TestTemplateOptionsParseDirectives/unquoted === RUN TestTemplateOptionsParseDirectives/quoted === RUN TestTemplateOptionsParseDirectives/left_only === RUN TestTemplateOptionsParseDirectives/left_quoted_only === RUN TestTemplateOptionsParseDirectives/right_quoted_only === RUN TestTemplateOptionsParseDirectives/line_with_leading_data === RUN TestTemplateOptionsParseDirectives/line_before === RUN TestTemplateOptionsParseDirectives/line_after === RUN TestTemplateOptionsParseDirectives/line_before_and_after === RUN TestTemplateOptionsParseDirectives/multiple_lines === RUN TestTemplateOptionsParseDirectives/duplicate_directives === RUN TestTemplateOptionsParseDirectives/missing_key === RUN TestTemplateOptionsParseDirectives/line_ending_crlf === RUN TestTemplateOptionsParseDirectives/line_ending_quoted --- PASS: TestTemplateOptionsParseDirectives (0.00s) --- PASS: TestTemplateOptionsParseDirectives/empty (0.00s) --- PASS: TestTemplateOptionsParseDirectives/unquoted (0.00s) --- PASS: TestTemplateOptionsParseDirectives/quoted (0.00s) --- PASS: TestTemplateOptionsParseDirectives/left_only (0.00s) --- PASS: TestTemplateOptionsParseDirectives/left_quoted_only (0.00s) --- PASS: TestTemplateOptionsParseDirectives/right_quoted_only (0.00s) --- PASS: TestTemplateOptionsParseDirectives/line_with_leading_data (0.00s) --- PASS: TestTemplateOptionsParseDirectives/line_before (0.00s) --- PASS: TestTemplateOptionsParseDirectives/line_after (0.00s) --- PASS: TestTemplateOptionsParseDirectives/line_before_and_after (0.00s) --- PASS: TestTemplateOptionsParseDirectives/multiple_lines (0.00s) --- PASS: TestTemplateOptionsParseDirectives/duplicate_directives (0.00s) --- PASS: TestTemplateOptionsParseDirectives/missing_key (0.00s) --- PASS: TestTemplateOptionsParseDirectives/line_ending_crlf (0.00s) --- PASS: TestTemplateOptionsParseDirectives/line_ending_quoted (0.00s) === RUN TestSourceStateEntryTreeNodeEmpty --- PASS: TestSourceStateEntryTreeNodeEmpty (0.00s) === RUN TestSourceStateEntryTreeNodeSingle --- PASS: TestSourceStateEntryTreeNodeSingle (0.00s) === RUN TestSourceStateEntryTreeNodeMultiple --- PASS: TestSourceStateEntryTreeNodeMultiple (0.00s) === RUN TestConcurrentWalkSourceDir --- PASS: TestConcurrentWalkSourceDir (0.00s) === RUN TestWalkSourceDir --- PASS: TestWalkSourceDir (0.00s) === RUN TestTargetStateEntryApply === RUN TestTargetStateEntryApply/target_dir_actual_dir === RUN TestTargetStateEntryApply/target_dir_actual_dir/0 === RUN TestTargetStateEntryApply/target_dir_actual_dir/1 === RUN TestTargetStateEntryApply/target_file_actual_dir === RUN TestTargetStateEntryApply/target_file_actual_dir/0 === RUN TestTargetStateEntryApply/target_file_actual_dir/1 === RUN TestTargetStateEntryApply/target_file_actual_dir/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_dir === RUN TestTargetStateEntryApply/target_file_empty_actual_dir/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_dir/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_dir/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_dir === RUN TestTargetStateEntryApply/target_file_executable_actual_dir/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_dir/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_dir/2 === RUN TestTargetStateEntryApply/target_remove_actual_dir === RUN TestTargetStateEntryApply/target_remove_actual_dir/0 === RUN TestTargetStateEntryApply/target_symlink_actual_dir === RUN TestTargetStateEntryApply/target_symlink_actual_dir/0 === RUN TestTargetStateEntryApply/target_symlink_actual_dir/1 === RUN TestTargetStateEntryApply/target_dir_actual_file === RUN TestTargetStateEntryApply/target_dir_actual_file/0 === RUN TestTargetStateEntryApply/target_dir_actual_file/1 === RUN TestTargetStateEntryApply/target_file_actual_file === RUN TestTargetStateEntryApply/target_file_actual_file/0 === RUN TestTargetStateEntryApply/target_file_actual_file/1 === RUN TestTargetStateEntryApply/target_file_actual_file/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_file === RUN TestTargetStateEntryApply/target_file_empty_actual_file/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_file/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_file/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_file === RUN TestTargetStateEntryApply/target_file_executable_actual_file/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_file/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_file/2 === RUN TestTargetStateEntryApply/target_remove_actual_file === RUN TestTargetStateEntryApply/target_remove_actual_file/0 === RUN TestTargetStateEntryApply/target_symlink_actual_file === RUN TestTargetStateEntryApply/target_symlink_actual_file/0 === RUN TestTargetStateEntryApply/target_symlink_actual_file/1 === RUN TestTargetStateEntryApply/target_dir_actual_file_empty === RUN TestTargetStateEntryApply/target_dir_actual_file_empty/0 === RUN TestTargetStateEntryApply/target_dir_actual_file_empty/1 === RUN TestTargetStateEntryApply/target_file_actual_file_empty === RUN TestTargetStateEntryApply/target_file_actual_file_empty/0 === RUN TestTargetStateEntryApply/target_file_actual_file_empty/1 === RUN TestTargetStateEntryApply/target_file_actual_file_empty/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_file_empty === RUN TestTargetStateEntryApply/target_file_empty_actual_file_empty/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_file_empty/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_file_empty/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_file_empty === RUN TestTargetStateEntryApply/target_file_executable_actual_file_empty/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_file_empty/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_file_empty/2 === RUN TestTargetStateEntryApply/target_remove_actual_file_empty === RUN TestTargetStateEntryApply/target_remove_actual_file_empty/0 === RUN TestTargetStateEntryApply/target_symlink_actual_file_empty === RUN TestTargetStateEntryApply/target_symlink_actual_file_empty/0 === RUN TestTargetStateEntryApply/target_symlink_actual_file_empty/1 === RUN TestTargetStateEntryApply/target_dir_actual_file_executable === RUN TestTargetStateEntryApply/target_dir_actual_file_executable/0 === RUN TestTargetStateEntryApply/target_dir_actual_file_executable/1 === RUN TestTargetStateEntryApply/target_file_actual_file_executable === RUN TestTargetStateEntryApply/target_file_actual_file_executable/0 === RUN TestTargetStateEntryApply/target_file_actual_file_executable/1 === RUN TestTargetStateEntryApply/target_file_actual_file_executable/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_file_executable === RUN TestTargetStateEntryApply/target_file_empty_actual_file_executable/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_file_executable/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_file_executable/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_file_executable === RUN TestTargetStateEntryApply/target_file_executable_actual_file_executable/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_file_executable/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_file_executable/2 === RUN TestTargetStateEntryApply/target_remove_actual_file_executable === RUN TestTargetStateEntryApply/target_remove_actual_file_executable/0 === RUN TestTargetStateEntryApply/target_symlink_actual_file_executable === RUN TestTargetStateEntryApply/target_symlink_actual_file_executable/0 === RUN TestTargetStateEntryApply/target_symlink_actual_file_executable/1 === RUN TestTargetStateEntryApply/target_dir_actual_remove === RUN TestTargetStateEntryApply/target_dir_actual_remove/0 === RUN TestTargetStateEntryApply/target_dir_actual_remove/1 === RUN TestTargetStateEntryApply/target_file_actual_remove === RUN TestTargetStateEntryApply/target_file_actual_remove/0 === RUN TestTargetStateEntryApply/target_file_actual_remove/1 === RUN TestTargetStateEntryApply/target_file_actual_remove/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_remove === RUN TestTargetStateEntryApply/target_file_empty_actual_remove/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_remove/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_remove/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_remove === RUN TestTargetStateEntryApply/target_file_executable_actual_remove/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_remove/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_remove/2 === RUN TestTargetStateEntryApply/target_remove_actual_remove === RUN TestTargetStateEntryApply/target_remove_actual_remove/0 === RUN TestTargetStateEntryApply/target_symlink_actual_remove === RUN TestTargetStateEntryApply/target_symlink_actual_remove/0 === RUN TestTargetStateEntryApply/target_symlink_actual_remove/1 === RUN TestTargetStateEntryApply/target_dir_actual_symlink === RUN TestTargetStateEntryApply/target_dir_actual_symlink/0 === RUN TestTargetStateEntryApply/target_dir_actual_symlink/1 === RUN TestTargetStateEntryApply/target_file_actual_symlink === RUN TestTargetStateEntryApply/target_file_actual_symlink/0 === RUN TestTargetStateEntryApply/target_file_actual_symlink/1 === RUN TestTargetStateEntryApply/target_file_actual_symlink/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink/2 === RUN TestTargetStateEntryApply/target_remove_actual_symlink === RUN TestTargetStateEntryApply/target_remove_actual_symlink/0 === RUN TestTargetStateEntryApply/target_symlink_actual_symlink === RUN TestTargetStateEntryApply/target_symlink_actual_symlink/0 === RUN TestTargetStateEntryApply/target_symlink_actual_symlink/1 === RUN TestTargetStateEntryApply/target_dir_actual_symlink_broken === RUN TestTargetStateEntryApply/target_dir_actual_symlink_broken/0 === RUN TestTargetStateEntryApply/target_dir_actual_symlink_broken/1 === RUN TestTargetStateEntryApply/target_file_actual_symlink_broken === RUN TestTargetStateEntryApply/target_file_actual_symlink_broken/0 === RUN TestTargetStateEntryApply/target_file_actual_symlink_broken/1 === RUN TestTargetStateEntryApply/target_file_actual_symlink_broken/2 === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink_broken === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink_broken/0 === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink_broken/1 === RUN TestTargetStateEntryApply/target_file_empty_actual_symlink_broken/2 === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink_broken === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink_broken/0 === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink_broken/1 === RUN TestTargetStateEntryApply/target_file_executable_actual_symlink_broken/2 === RUN TestTargetStateEntryApply/target_remove_actual_symlink_broken === RUN TestTargetStateEntryApply/target_remove_actual_symlink_broken/0 === RUN TestTargetStateEntryApply/target_symlink_actual_symlink_broken === RUN TestTargetStateEntryApply/target_symlink_actual_symlink_broken/0 === RUN TestTargetStateEntryApply/target_symlink_actual_symlink_broken/1 --- PASS: TestTargetStateEntryApply (0.08s) --- PASS: TestTargetStateEntryApply/target_dir_actual_dir (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_dir/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_dir/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_dir (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_dir/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_dir/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_dir/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_dir (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_dir/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_dir/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_dir/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_dir (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_dir/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_dir/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_dir/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_dir (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_dir/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_dir (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_dir/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_dir/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_file (0.01s) --- PASS: TestTargetStateEntryApply/target_remove_actual_file/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file_empty (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file_empty/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file_empty/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_empty (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_empty/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_empty/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_empty/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_empty (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_empty/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_empty/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_empty/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_empty (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_empty/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_empty/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_empty/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_file_empty (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_file_empty/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file_empty (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file_empty/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file_empty/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file_executable (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file_executable/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_file_executable/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_executable (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_executable/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_executable/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_file_executable/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_executable (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_executable/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_executable/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_file_executable/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_executable (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_executable/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_executable/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_file_executable/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_file_executable (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_file_executable/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file_executable (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file_executable/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_file_executable/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_remove (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_remove/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_remove/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_remove (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_remove/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_remove/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_remove/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_remove (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_remove/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_remove/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_remove/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_remove (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_remove/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_remove/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_remove/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_remove (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_remove/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_remove (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_remove/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_remove/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_symlink (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_symlink/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_symlink/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_symlink (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_symlink/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_symlink (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_symlink/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_symlink/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_symlink_broken (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_symlink_broken/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_dir_actual_symlink_broken/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink_broken (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink_broken/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink_broken/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_actual_symlink_broken/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink_broken (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink_broken/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink_broken/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_empty_actual_symlink_broken/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink_broken (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink_broken/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink_broken/1 (0.00s) --- PASS: TestTargetStateEntryApply/target_file_executable_actual_symlink_broken/2 (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_symlink_broken (0.00s) --- PASS: TestTargetStateEntryApply/target_remove_actual_symlink_broken/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_symlink_broken (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_symlink_broken/0 (0.00s) --- PASS: TestTargetStateEntryApply/target_symlink_actual_symlink_broken/1 (0.00s) === RUN TestTarWriterSystem === RUN TestTarWriterSystem/.dir/ === RUN TestTarWriterSystem/.dir/file === RUN TestTarWriterSystem/script === RUN TestTarWriterSystem/symlink --- PASS: TestTarWriterSystem (0.01s) --- PASS: TestTarWriterSystem/.dir/ (0.00s) --- PASS: TestTarWriterSystem/.dir/file (0.00s) --- PASS: TestTarWriterSystem/script (0.00s) --- PASS: TestTarWriterSystem/symlink (0.00s) === RUN TestTemplateParseAndExecute === RUN TestTemplateParseAndExecute/missing_key === RUN TestTemplateParseAndExecute/delimiters === RUN TestTemplateParseAndExecute/line_ending_crlf === RUN TestTemplateParseAndExecute/line_ending_lf --- PASS: TestTemplateParseAndExecute (0.00s) --- PASS: TestTemplateParseAndExecute/missing_key (0.00s) --- PASS: TestTemplateParseAndExecute/delimiters (0.00s) --- PASS: TestTemplateParseAndExecute/line_ending_crlf (0.00s) --- PASS: TestTemplateParseAndExecute/line_ending_lf (0.00s) === RUN TestZIPWriterSystem === RUN TestZIPWriterSystem/.dir === RUN TestZIPWriterSystem/.dir/file === RUN TestZIPWriterSystem/script === RUN TestZIPWriterSystem/symlink --- PASS: TestZIPWriterSystem (0.02s) --- PASS: TestZIPWriterSystem/.dir (0.00s) --- PASS: TestZIPWriterSystem/.dir/file (0.00s) --- PASS: TestZIPWriterSystem/script (0.00s) --- PASS: TestZIPWriterSystem/symlink (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/chezmoi 5.089s === RUN TestBoolInputModel === RUN TestBoolInputModel/empty_with_default === RUN TestBoolInputModel/cancel_ctrlc === RUN TestBoolInputModel/cancel_esc === RUN TestBoolInputModel/true === RUN TestBoolInputModel/false === RUN TestBoolInputModel/yes === RUN TestBoolInputModel/no === RUN TestBoolInputModel/one === RUN TestBoolInputModel/zero --- PASS: TestBoolInputModel (0.00s) --- PASS: TestBoolInputModel/empty_with_default (0.00s) --- PASS: TestBoolInputModel/cancel_ctrlc (0.00s) --- PASS: TestBoolInputModel/cancel_esc (0.00s) --- PASS: TestBoolInputModel/true (0.00s) --- PASS: TestBoolInputModel/false (0.00s) --- PASS: TestBoolInputModel/yes (0.00s) --- PASS: TestBoolInputModel/no (0.00s) --- PASS: TestBoolInputModel/one (0.00s) --- PASS: TestBoolInputModel/zero (0.00s) === RUN TestChoiceInputModel === RUN TestChoiceInputModel/empty_with_default === RUN TestChoiceInputModel/cancel_ctrlc === RUN TestChoiceInputModel/cancel_esc === RUN TestChoiceInputModel/y === RUN TestChoiceInputModel/n === RUN TestChoiceInputModel/a === RUN TestChoiceInputModel/ambiguous_a === RUN TestChoiceInputModel/unambiguous_b === RUN TestChoiceInputModel/ambiguous_resolved --- PASS: TestChoiceInputModel (0.00s) --- PASS: TestChoiceInputModel/empty_with_default (0.00s) --- PASS: TestChoiceInputModel/cancel_ctrlc (0.00s) --- PASS: TestChoiceInputModel/cancel_esc (0.00s) --- PASS: TestChoiceInputModel/y (0.00s) --- PASS: TestChoiceInputModel/n (0.00s) --- PASS: TestChoiceInputModel/a (0.00s) --- PASS: TestChoiceInputModel/ambiguous_a (0.00s) --- PASS: TestChoiceInputModel/unambiguous_b (0.00s) --- PASS: TestChoiceInputModel/ambiguous_resolved (0.00s) === RUN TestIntInputModel === RUN TestIntInputModel/empty_with_default === RUN TestIntInputModel/cancel_ctrlc === RUN TestIntInputModel/cancel_esc === RUN TestIntInputModel/one_enter === RUN TestIntInputModel/minus_one_enter === RUN TestIntInputModel/minus_enter === RUN TestIntInputModel/one_invalid_enter --- PASS: TestIntInputModel (0.00s) --- PASS: TestIntInputModel/empty_with_default (0.00s) --- PASS: TestIntInputModel/cancel_ctrlc (0.00s) --- PASS: TestIntInputModel/cancel_esc (0.00s) --- PASS: TestIntInputModel/one_enter (0.00s) --- PASS: TestIntInputModel/minus_one_enter (0.00s) --- PASS: TestIntInputModel/minus_enter (0.00s) --- PASS: TestIntInputModel/one_invalid_enter (0.00s) === RUN TestPasswordInputModel === RUN TestPasswordInputModel/empty === RUN TestPasswordInputModel/cancel_ctrlc === RUN TestPasswordInputModel/cancel_esc === RUN TestPasswordInputModel/password_enter === RUN TestPasswordInputModel/password_ctrlc --- PASS: TestPasswordInputModel (0.00s) --- PASS: TestPasswordInputModel/empty (0.00s) --- PASS: TestPasswordInputModel/cancel_ctrlc (0.00s) --- PASS: TestPasswordInputModel/cancel_esc (0.00s) --- PASS: TestPasswordInputModel/password_enter (0.00s) --- PASS: TestPasswordInputModel/password_ctrlc (0.00s) === RUN TestStringInputModel === RUN TestStringInputModel/empty === RUN TestStringInputModel/empty_with_default === RUN TestStringInputModel/cancel_ctrlc === RUN TestStringInputModel/cancel_esc === RUN TestStringInputModel/value_enter === RUN TestStringInputModel/value_ctrlc --- PASS: TestStringInputModel (0.00s) --- PASS: TestStringInputModel/empty (0.00s) --- PASS: TestStringInputModel/empty_with_default (0.00s) --- PASS: TestStringInputModel/cancel_ctrlc (0.00s) --- PASS: TestStringInputModel/cancel_esc (0.00s) --- PASS: TestStringInputModel/value_enter (0.00s) --- PASS: TestStringInputModel/value_ctrlc (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/chezmoibubbles 0.328s === RUN TestParseStatusPorcelainV2 === RUN TestParseStatusPorcelainV2/empty === RUN TestParseStatusPorcelainV2/added === RUN TestParseStatusPorcelainV2/removed === RUN TestParseStatusPorcelainV2/update === RUN TestParseStatusPorcelainV2/renamed === RUN TestParseStatusPorcelainV2/renamed_2 === RUN TestParseStatusPorcelainV2/modified_2 === RUN TestParseStatusPorcelainV2/unmerged === RUN TestParseStatusPorcelainV2/untracked === RUN TestParseStatusPorcelainV2/ignored --- PASS: TestParseStatusPorcelainV2 (0.00s) --- PASS: TestParseStatusPorcelainV2/empty (0.00s) --- PASS: TestParseStatusPorcelainV2/added (0.00s) --- PASS: TestParseStatusPorcelainV2/removed (0.00s) --- PASS: TestParseStatusPorcelainV2/update (0.00s) --- PASS: TestParseStatusPorcelainV2/renamed (0.00s) --- PASS: TestParseStatusPorcelainV2/renamed_2 (0.00s) --- PASS: TestParseStatusPorcelainV2/modified_2 (0.00s) --- PASS: TestParseStatusPorcelainV2/unmerged (0.00s) --- PASS: TestParseStatusPorcelainV2/untracked (0.00s) --- PASS: TestParseStatusPorcelainV2/ignored (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/chezmoigit 0.180s testing: warning: no tests to run PASS ok github.com/twpayne/chezmoi/v2/internal/chezmoilog 0.221s [no tests to run] === RUN TestJoinLines === RUN TestJoinLines/0 === RUN TestJoinLines/1 === RUN TestJoinLines/2 === RUN TestJoinLines/3 --- PASS: TestJoinLines (0.00s) --- PASS: TestJoinLines/0 (0.00s) --- PASS: TestJoinLines/1 (0.00s) --- PASS: TestJoinLines/2 (0.00s) --- PASS: TestJoinLines/3 (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/chezmoitest 0.234s ? github.com/twpayne/chezmoi/v2/internal/cmds/execute-template [no test files] ? github.com/twpayne/chezmoi/v2/internal/cmds/lint-txtar [no test files] === RUN TestAddCmd === RUN TestAddCmd/dir === RUN TestAddCmd/dir/0 === RUN TestAddCmd/dir/1 === RUN TestAddCmd/dir/0#01 === RUN TestAddCmd/dir/1#01 === RUN TestAddCmd/dir_with_file === RUN TestAddCmd/dir_with_file/0 === RUN TestAddCmd/dir_with_file/1 === RUN TestAddCmd/dir_with_file/0#01 === RUN TestAddCmd/dir_with_file/0#02 === RUN TestAddCmd/dir_with_file/1#01 === RUN TestAddCmd/dir_with_file/2 === RUN TestAddCmd/dir_with_file_with_--recursive=false === RUN TestAddCmd/dir_with_file_with_--recursive=false/0 === RUN TestAddCmd/dir_with_file_with_--recursive=false/1 === RUN TestAddCmd/dir_with_file_with_--recursive=false/0#01 === RUN TestAddCmd/dir_with_file_with_--recursive=false/1#01 === RUN TestAddCmd/dir_with_file_with_--recursive=false/0#02 === RUN TestAddCmd/dir_private_unix === RUN TestAddCmd/dir_private_unix/0 === RUN TestAddCmd/dir_private_unix/1 === RUN TestAddCmd/dir_private_unix/0#01 === RUN TestAddCmd/dir_private_unix/0#02 === RUN TestAddCmd/dir_private_unix/1#01 === RUN TestAddCmd/dir_private_unix/2 === RUN TestAddCmd/dir_file_private_unix === RUN TestAddCmd/dir_file_private_unix/0 === RUN TestAddCmd/dir_file_private_unix/1 === RUN TestAddCmd/dir_file_private_unix/0#01 === RUN TestAddCmd/dir_file_private_unix/0#02 === RUN TestAddCmd/dir_file_private_unix/1#01 === RUN TestAddCmd/dir_file_private_unix/2 === RUN TestAddCmd/empty === RUN TestAddCmd/empty/0 === RUN TestAddCmd/empty/1 === RUN TestAddCmd/empty/2 === RUN TestAddCmd/executable_unix === RUN TestAddCmd/executable_unix/0 === RUN TestAddCmd/executable_unix/1 === RUN TestAddCmd/executable_unix/2 === RUN TestAddCmd/file === RUN TestAddCmd/file/0 === RUN TestAddCmd/file/1 === RUN TestAddCmd/file/2 === RUN TestAddCmd/symlink === RUN TestAddCmd/symlink/0 === RUN TestAddCmd/symlink/1 === RUN TestAddCmd/symlink/2 === RUN TestAddCmd/symlink_with_--follow === RUN TestAddCmd/symlink_with_--follow/0 === RUN TestAddCmd/symlink_with_--follow/1 === RUN TestAddCmd/symlink_with_--follow/2 --- PASS: TestAddCmd (1.12s) --- PASS: TestAddCmd/dir (0.18s) --- PASS: TestAddCmd/dir/0 (0.00s) --- PASS: TestAddCmd/dir/1 (0.00s) --- PASS: TestAddCmd/dir/0#01 (0.00s) --- PASS: TestAddCmd/dir/1#01 (0.00s) --- PASS: TestAddCmd/dir_with_file (0.20s) --- PASS: TestAddCmd/dir_with_file/0 (0.00s) --- PASS: TestAddCmd/dir_with_file/1 (0.00s) --- PASS: TestAddCmd/dir_with_file/0#01 (0.00s) --- PASS: TestAddCmd/dir_with_file/0#02 (0.00s) --- PASS: TestAddCmd/dir_with_file/1#01 (0.00s) --- PASS: TestAddCmd/dir_with_file/2 (0.00s) --- PASS: TestAddCmd/dir_with_file_with_--recursive=false (0.02s) --- PASS: TestAddCmd/dir_with_file_with_--recursive=false/0 (0.00s) --- PASS: TestAddCmd/dir_with_file_with_--recursive=false/1 (0.00s) --- PASS: TestAddCmd/dir_with_file_with_--recursive=false/0#01 (0.00s) --- PASS: TestAddCmd/dir_with_file_with_--recursive=false/1#01 (0.00s) --- PASS: TestAddCmd/dir_with_file_with_--recursive=false/0#02 (0.00s) --- PASS: TestAddCmd/dir_private_unix (0.16s) --- PASS: TestAddCmd/dir_private_unix/0 (0.00s) --- PASS: TestAddCmd/dir_private_unix/1 (0.00s) --- PASS: TestAddCmd/dir_private_unix/0#01 (0.00s) --- PASS: TestAddCmd/dir_private_unix/0#02 (0.00s) --- PASS: TestAddCmd/dir_private_unix/1#01 (0.00s) --- PASS: TestAddCmd/dir_private_unix/2 (0.00s) --- PASS: TestAddCmd/dir_file_private_unix (0.10s) --- PASS: TestAddCmd/dir_file_private_unix/0 (0.00s) --- PASS: TestAddCmd/dir_file_private_unix/1 (0.00s) --- PASS: TestAddCmd/dir_file_private_unix/0#01 (0.00s) --- PASS: TestAddCmd/dir_file_private_unix/0#02 (0.00s) --- PASS: TestAddCmd/dir_file_private_unix/1#01 (0.00s) --- PASS: TestAddCmd/dir_file_private_unix/2 (0.00s) --- PASS: TestAddCmd/empty (0.11s) --- PASS: TestAddCmd/empty/0 (0.00s) --- PASS: TestAddCmd/empty/1 (0.00s) --- PASS: TestAddCmd/empty/2 (0.00s) --- PASS: TestAddCmd/executable_unix (0.11s) --- PASS: TestAddCmd/executable_unix/0 (0.00s) --- PASS: TestAddCmd/executable_unix/1 (0.00s) --- PASS: TestAddCmd/executable_unix/2 (0.00s) --- PASS: TestAddCmd/file (0.10s) --- PASS: TestAddCmd/file/0 (0.00s) --- PASS: TestAddCmd/file/1 (0.00s) --- PASS: TestAddCmd/file/2 (0.00s) --- PASS: TestAddCmd/symlink (0.02s) --- PASS: TestAddCmd/symlink/0 (0.00s) --- PASS: TestAddCmd/symlink/1 (0.00s) --- PASS: TestAddCmd/symlink/2 (0.00s) --- PASS: TestAddCmd/symlink_with_--follow (0.11s) --- PASS: TestAddCmd/symlink_with_--follow/0 (0.00s) --- PASS: TestAddCmd/symlink_with_--follow/1 (0.00s) --- PASS: TestAddCmd/symlink_with_--follow/2 (0.00s) === RUN TestAddCmdChmod --- PASS: TestAddCmdChmod (0.20s) === RUN TestAddCmdSecretsError chezmoi: /home/user/.secret:1: Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms. --- PASS: TestAddCmdSecretsError (0.10s) === RUN TestApplyCmd === RUN TestApplyCmd/all === RUN TestApplyCmd/all/0 === RUN TestApplyCmd/all/1 === RUN TestApplyCmd/all/2 === RUN TestApplyCmd/all/0#01 === RUN TestApplyCmd/all/1#01 === RUN TestApplyCmd/all/0#02 === RUN TestApplyCmd/all/1#02 === RUN TestApplyCmd/all/2#01 === RUN TestApplyCmd/all/0#03 === RUN TestApplyCmd/all/1#03 === RUN TestApplyCmd/all/0#04 === RUN TestApplyCmd/all/1#04 === RUN TestApplyCmd/all/2#02 === RUN TestApplyCmd/all/0#05 === RUN TestApplyCmd/all/1#05 === RUN TestApplyCmd/all/2#03 === RUN TestApplyCmd/all/0#06 === RUN TestApplyCmd/all/1#06 === RUN TestApplyCmd/all/2#04 === RUN TestApplyCmd/all/0#07 === RUN TestApplyCmd/all/1#07 === RUN TestApplyCmd/all/2#05 === RUN TestApplyCmd/all/0#08 === RUN TestApplyCmd/all/1#08 === RUN TestApplyCmd/all/2#06 === RUN TestApplyCmd/all/0#09 === RUN TestApplyCmd/all/0#10 === RUN TestApplyCmd/all/1#09 === RUN TestApplyCmd/all/0#11 === RUN TestApplyCmd/all/1#10 === RUN TestApplyCmd/all/2#07 === RUN TestApplyCmd/all_with_--dry-run === RUN TestApplyCmd/all_with_--dry-run/0 === RUN TestApplyCmd/all_with_--dry-run/0#01 === RUN TestApplyCmd/all_with_--dry-run/0#02 === RUN TestApplyCmd/all_with_--dry-run/0#03 === RUN TestApplyCmd/all_with_--dry-run/0#04 === RUN TestApplyCmd/all_with_--dry-run/0#05 === RUN TestApplyCmd/all_with_--dry-run/0#06 === RUN TestApplyCmd/all_with_--dry-run/0#07 === RUN TestApplyCmd/all_with_--dry-run/0#08 === RUN TestApplyCmd/dir === RUN TestApplyCmd/dir/0 === RUN TestApplyCmd/dir/1 === RUN TestApplyCmd/dir/0#01 === RUN TestApplyCmd/dir/1#01 === RUN TestApplyCmd/dir/2 === RUN TestApplyCmd/dir/0#02 === RUN TestApplyCmd/dir/1#02 === RUN TestApplyCmd/dir/0#03 === RUN TestApplyCmd/dir/1#03 === RUN TestApplyCmd/dir/2#01 === RUN TestApplyCmd/dir_with_--recursive=false === RUN TestApplyCmd/dir_with_--recursive=false/0 === RUN TestApplyCmd/dir_with_--recursive=false/1 === RUN TestApplyCmd/dir_with_--recursive=false/0#01 === RUN TestApplyCmd/dir_with_--recursive=false/0#02 === RUN TestApplyCmd/create === RUN TestApplyCmd/create/0 === RUN TestApplyCmd/create/1 === RUN TestApplyCmd/create/2 --- PASS: TestApplyCmd (0.20s) --- PASS: TestApplyCmd/all (0.07s) --- PASS: TestApplyCmd/all/0 (0.00s) --- PASS: TestApplyCmd/all/1 (0.00s) --- PASS: TestApplyCmd/all/2 (0.00s) --- PASS: TestApplyCmd/all/0#01 (0.00s) --- PASS: TestApplyCmd/all/1#01 (0.00s) --- PASS: TestApplyCmd/all/0#02 (0.00s) --- PASS: TestApplyCmd/all/1#02 (0.00s) --- PASS: TestApplyCmd/all/2#01 (0.00s) --- PASS: TestApplyCmd/all/0#03 (0.00s) --- PASS: TestApplyCmd/all/1#03 (0.00s) --- PASS: TestApplyCmd/all/0#04 (0.00s) --- PASS: TestApplyCmd/all/1#04 (0.00s) --- PASS: TestApplyCmd/all/2#02 (0.00s) --- PASS: TestApplyCmd/all/0#05 (0.00s) --- PASS: TestApplyCmd/all/1#05 (0.00s) --- PASS: TestApplyCmd/all/2#03 (0.00s) --- PASS: TestApplyCmd/all/0#06 (0.00s) --- PASS: TestApplyCmd/all/1#06 (0.00s) --- PASS: TestApplyCmd/all/2#04 (0.00s) --- PASS: TestApplyCmd/all/0#07 (0.00s) --- PASS: TestApplyCmd/all/1#07 (0.00s) --- PASS: TestApplyCmd/all/2#05 (0.00s) --- PASS: TestApplyCmd/all/0#08 (0.00s) --- PASS: TestApplyCmd/all/1#08 (0.00s) --- PASS: TestApplyCmd/all/2#06 (0.00s) --- PASS: TestApplyCmd/all/0#09 (0.00s) --- PASS: TestApplyCmd/all/0#10 (0.00s) --- PASS: TestApplyCmd/all/1#09 (0.00s) --- PASS: TestApplyCmd/all/0#11 (0.00s) --- PASS: TestApplyCmd/all/1#10 (0.00s) --- PASS: TestApplyCmd/all/2#07 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run (0.05s) --- PASS: TestApplyCmd/all_with_--dry-run/0 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#01 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#02 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#03 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#04 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#05 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#06 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#07 (0.00s) --- PASS: TestApplyCmd/all_with_--dry-run/0#08 (0.00s) --- PASS: TestApplyCmd/dir (0.03s) --- PASS: TestApplyCmd/dir/0 (0.00s) --- PASS: TestApplyCmd/dir/1 (0.00s) --- PASS: TestApplyCmd/dir/0#01 (0.00s) --- PASS: TestApplyCmd/dir/1#01 (0.00s) --- PASS: TestApplyCmd/dir/2 (0.00s) --- PASS: TestApplyCmd/dir/0#02 (0.00s) --- PASS: TestApplyCmd/dir/1#02 (0.00s) --- PASS: TestApplyCmd/dir/0#03 (0.00s) --- PASS: TestApplyCmd/dir/1#03 (0.00s) --- PASS: TestApplyCmd/dir/2#01 (0.00s) --- PASS: TestApplyCmd/dir_with_--recursive=false (0.02s) --- PASS: TestApplyCmd/dir_with_--recursive=false/0 (0.00s) --- PASS: TestApplyCmd/dir_with_--recursive=false/1 (0.00s) --- PASS: TestApplyCmd/dir_with_--recursive=false/0#01 (0.00s) --- PASS: TestApplyCmd/dir_with_--recursive=false/0#02 (0.00s) --- PASS: TestApplyCmd/create (0.02s) --- PASS: TestApplyCmd/create/0 (0.00s) --- PASS: TestApplyCmd/create/1 (0.00s) --- PASS: TestApplyCmd/create/2 (0.00s) === RUN TestIssue2132 === RUN TestIssue2132/0 === RUN TestIssue2132/0#01 --- PASS: TestIssue2132 (0.03s) --- PASS: TestIssue2132/0 (0.00s) --- PASS: TestIssue2132/0#01 (0.00s) === RUN TestIssue3206 --- PASS: TestIssue3206 (0.03s) === RUN TestIssue3216 --- PASS: TestIssue3216 (0.03s) === RUN TestCatCmd === RUN TestCatCmd/template_delimiters --- PASS: TestCatCmd (0.02s) --- PASS: TestCatCmd/template_delimiters (0.02s) === RUN TestChattrCmdValidArgs === RUN TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"a") === RUN TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"e") === RUN TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"-c") === RUN TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"+o") === RUN TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"nop") === RUN TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"empty,s") --- PASS: TestChattrCmdValidArgs (0.00s) --- PASS: TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"a") (0.00s) --- PASS: TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"e") (0.00s) --- PASS: TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"-c") (0.00s) --- PASS: TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"+o") (0.00s) --- PASS: TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"nop") (0.00s) --- PASS: TestChattrCmdValidArgs/chattrValidArgs(_,_[],_"empty,s") (0.00s) === RUN TestParseAttrModifier === RUN TestParseAttrModifier/empty === RUN TestParseAttrModifier/+empty === RUN TestParseAttrModifier/-empty === RUN TestParseAttrModifier/noempty === RUN TestParseAttrModifier/e === RUN TestParseAttrModifier/encrypted === RUN TestParseAttrModifier/executable === RUN TestParseAttrModifier/x === RUN TestParseAttrModifier/b === RUN TestParseAttrModifier/-b === RUN TestParseAttrModifier/after === RUN TestParseAttrModifier/noafter === RUN TestParseAttrModifier/once === RUN TestParseAttrModifier/private === RUN TestParseAttrModifier/p === RUN TestParseAttrModifier/template === RUN TestParseAttrModifier/t === RUN TestParseAttrModifier/create === RUN TestParseAttrModifier/-create === RUN TestParseAttrModifier/modify === RUN TestParseAttrModifier/-script === RUN TestParseAttrModifier/+symlink === RUN TestParseAttrModifier/empty,+executable,noprivate,-t === RUN TestParseAttrModifier/_empty_,_-private,_notemplate_ === RUN TestParseAttrModifier/p,,-t === RUN TestParseAttrModifier/unknown --- PASS: TestParseAttrModifier (0.01s) --- PASS: TestParseAttrModifier/empty (0.00s) --- PASS: TestParseAttrModifier/+empty (0.00s) --- PASS: TestParseAttrModifier/-empty (0.00s) --- PASS: TestParseAttrModifier/noempty (0.00s) --- PASS: TestParseAttrModifier/e (0.00s) --- PASS: TestParseAttrModifier/encrypted (0.00s) --- PASS: TestParseAttrModifier/executable (0.00s) --- PASS: TestParseAttrModifier/x (0.00s) --- PASS: TestParseAttrModifier/b (0.00s) --- PASS: TestParseAttrModifier/-b (0.00s) --- PASS: TestParseAttrModifier/after (0.00s) --- PASS: TestParseAttrModifier/noafter (0.00s) --- PASS: TestParseAttrModifier/once (0.00s) --- PASS: TestParseAttrModifier/private (0.00s) --- PASS: TestParseAttrModifier/p (0.00s) --- PASS: TestParseAttrModifier/template (0.00s) --- PASS: TestParseAttrModifier/t (0.00s) --- PASS: TestParseAttrModifier/create (0.00s) --- PASS: TestParseAttrModifier/-create (0.00s) --- PASS: TestParseAttrModifier/modify (0.00s) --- PASS: TestParseAttrModifier/-script (0.00s) --- PASS: TestParseAttrModifier/+symlink (0.00s) --- PASS: TestParseAttrModifier/empty,+executable,noprivate,-t (0.00s) --- PASS: TestParseAttrModifier/_empty_,_-private,_notemplate_ (0.00s) --- PASS: TestParseAttrModifier/p,,-t (0.00s) --- PASS: TestParseAttrModifier/unknown (0.00s) === RUN TestDeDuplicateError === RUN TestDeDuplicateError/0 === RUN TestDeDuplicateError/1 === RUN TestDeDuplicateError/2 === RUN TestDeDuplicateError/3 === RUN TestDeDuplicateError/4 === RUN TestDeDuplicateError/5 === RUN TestDeDuplicateError/6 === RUN TestDeDuplicateError/7 --- PASS: TestDeDuplicateError (0.00s) --- PASS: TestDeDuplicateError/0 (0.00s) --- PASS: TestDeDuplicateError/1 (0.00s) --- PASS: TestDeDuplicateError/2 (0.00s) --- PASS: TestDeDuplicateError/3 (0.00s) --- PASS: TestDeDuplicateError/4 (0.00s) --- PASS: TestDeDuplicateError/5 (0.00s) --- PASS: TestDeDuplicateError/6 (0.00s) --- PASS: TestDeDuplicateError/7 (0.00s) === RUN TestMustGetLongHelpPanics --- PASS: TestMustGetLongHelpPanics (0.00s) === RUN TestAddTemplateFuncPanic --- PASS: TestAddTemplateFuncPanic (0.00s) === RUN TestParseCommand === RUN TestParseCommand/0 === RUN TestParseCommand/1 === RUN TestParseCommand/2 === RUN TestParseCommand/3 --- PASS: TestParseCommand (0.01s) --- PASS: TestParseCommand/0 (0.00s) --- PASS: TestParseCommand/1 (0.00s) --- PASS: TestParseCommand/2 (0.00s) --- PASS: TestParseCommand/3 (0.00s) === RUN TestParseConfig === RUN TestParseConfig/json_bool === RUN TestParseConfig/json_string === RUN TestParseConfig/toml_bool === RUN TestParseConfig/toml_string === RUN TestParseConfig/yaml_bool === RUN TestParseConfig/yaml_string --- PASS: TestParseConfig (0.65s) --- PASS: TestParseConfig/json_bool (0.34s) --- PASS: TestParseConfig/json_string (0.07s) --- PASS: TestParseConfig/toml_bool (0.08s) --- PASS: TestParseConfig/toml_string (0.06s) --- PASS: TestParseConfig/yaml_bool (0.05s) --- PASS: TestParseConfig/yaml_string (0.05s) === RUN TestUpperSnakeCaseToCamelCase --- PASS: TestUpperSnakeCaseToCamelCase (0.00s) === RUN TestDataCmd === RUN TestDataCmd/json === RUN TestDataCmd/yaml --- PASS: TestDataCmd (0.04s) --- PASS: TestDataCmd/json (0.02s) --- PASS: TestDataCmd/yaml (0.02s) === RUN TestDiffCmd === RUN TestDiffCmd/empty === RUN TestDiffCmd/file === RUN TestDiffCmd/simple_exclude_files === RUN TestDiffCmd/simple_exclude_files_with_config === RUN TestDiffCmd/simple_exclude_externals_with_config --- PASS: TestDiffCmd (0.07s) --- PASS: TestDiffCmd/empty (0.01s) --- PASS: TestDiffCmd/file (0.01s) --- PASS: TestDiffCmd/simple_exclude_files (0.01s) --- PASS: TestDiffCmd/simple_exclude_files_with_config (0.02s) --- PASS: TestDiffCmd/simple_exclude_externals_with_config (0.02s) === RUN TestImportCmd === RUN TestImportCmd/--strip-components=1 === RUN TestImportCmd/--strip-components=1/0 === RUN TestImportCmd/--strip-components=1/1 === RUN TestImportCmd/--strip-components=1/0#01 === RUN TestImportCmd/--strip-components=1/1#01 === RUN TestImportCmd/--strip-components=1/2 === RUN TestImportCmd/--strip-components=1/0#02 === RUN TestImportCmd/--strip-components=1/1#02 === RUN TestImportCmd/--strip-components=1/2#01 === RUN TestImportCmd/--destination=~/dir_--strip-components=1 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/0 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/1 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/0#01 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/1#01 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/2 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/0#02 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/1#02 === RUN TestImportCmd/--destination=~/dir_--strip-components=1/2#01 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/1 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0#01 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0#02 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/1#01 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/2 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0#03 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/1#02 === RUN TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/2#01 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/0 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/1 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/0#01 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/1#01 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/2 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/0#02 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/1#02 === RUN TestImportCmd/--destination=~/dir_--exact_--strip-components=1/2#01 --- PASS: TestImportCmd (0.12s) --- PASS: TestImportCmd/--strip-components=1 (0.02s) --- PASS: TestImportCmd/--strip-components=1/0 (0.00s) --- PASS: TestImportCmd/--strip-components=1/1 (0.00s) --- PASS: TestImportCmd/--strip-components=1/0#01 (0.00s) --- PASS: TestImportCmd/--strip-components=1/1#01 (0.00s) --- PASS: TestImportCmd/--strip-components=1/2 (0.00s) --- PASS: TestImportCmd/--strip-components=1/0#02 (0.00s) --- PASS: TestImportCmd/--strip-components=1/1#02 (0.00s) --- PASS: TestImportCmd/--strip-components=1/2#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1 (0.02s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/0 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/1 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/0#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/1#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/2 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/0#02 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/1#02 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--strip-components=1/2#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1 (0.02s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/1 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0#02 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/1#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/2 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/0#03 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/1#02 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--remove-destination_--strip-components=1/2#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1 (0.02s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/0 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/1 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/0#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/1#01 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/2 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/0#02 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/1#02 (0.00s) --- PASS: TestImportCmd/--destination=~/dir_--exact_--strip-components=1/2#01 (0.00s) === RUN TestGuessRepoURL === RUN TestGuessRepoURL/git@github.com:user/dotfiles.git === RUN TestGuessRepoURL/codeberg.org/user === RUN TestGuessRepoURL/codeberg.org/user/dots === RUN TestGuessRepoURL/gitlab.com/user === RUN TestGuessRepoURL/gitlab.com/user/dots === RUN TestGuessRepoURL/gitlab.com/user/dots.git === RUN TestGuessRepoURL/http://gitlab.com/user/dots.git === RUN TestGuessRepoURL/https://gitlab.com/user/dots.git === RUN TestGuessRepoURL/sr.ht/~user_name === RUN TestGuessRepoURL/sr.ht/~user_name/dots === RUN TestGuessRepoURL/user === RUN TestGuessRepoURL/user/chezmoi_dotfiles === RUN TestGuessRepoURL/user/.dotfiles === RUN TestGuessRepoURL/user/dots === RUN TestGuessRepoURL/user/dots.git --- PASS: TestGuessRepoURL (0.00s) --- PASS: TestGuessRepoURL/git@github.com:user/dotfiles.git (0.00s) --- PASS: TestGuessRepoURL/codeberg.org/user (0.00s) --- PASS: TestGuessRepoURL/codeberg.org/user/dots (0.00s) --- PASS: TestGuessRepoURL/gitlab.com/user (0.00s) --- PASS: TestGuessRepoURL/gitlab.com/user/dots (0.00s) --- PASS: TestGuessRepoURL/gitlab.com/user/dots.git (0.00s) --- PASS: TestGuessRepoURL/http://gitlab.com/user/dots.git (0.00s) --- PASS: TestGuessRepoURL/https://gitlab.com/user/dots.git (0.00s) --- PASS: TestGuessRepoURL/sr.ht/~user_name (0.00s) --- PASS: TestGuessRepoURL/sr.ht/~user_name/dots (0.00s) --- PASS: TestGuessRepoURL/user (0.00s) --- PASS: TestGuessRepoURL/user/chezmoi_dotfiles (0.00s) --- PASS: TestGuessRepoURL/user/.dotfiles (0.00s) --- PASS: TestGuessRepoURL/user/dots (0.00s) --- PASS: TestGuessRepoURL/user/dots.git (0.00s) === RUN TestIssue2137 --- PASS: TestIssue2137 (0.01s) === RUN TestIssue2283 --- PASS: TestIssue2283 (0.06s) === RUN TestPromptBoolInteractiveTemplateFunc === RUN TestPromptBoolInteractiveTemplateFunc/response_without_default === RUN TestPromptBoolInteractiveTemplateFunc/response_with_default === RUN TestPromptBoolInteractiveTemplateFunc/no_response_with_default === RUN TestPromptBoolInteractiveTemplateFunc/invalid_response === RUN TestPromptBoolInteractiveTemplateFunc/invalid_response_with_default === RUN TestPromptBoolInteractiveTemplateFunc/too_many_args --- PASS: TestPromptBoolInteractiveTemplateFunc (0.01s) --- PASS: TestPromptBoolInteractiveTemplateFunc/response_without_default (0.00s) --- PASS: TestPromptBoolInteractiveTemplateFunc/response_with_default (0.00s) --- PASS: TestPromptBoolInteractiveTemplateFunc/no_response_with_default (0.00s) --- PASS: TestPromptBoolInteractiveTemplateFunc/invalid_response (0.00s) --- PASS: TestPromptBoolInteractiveTemplateFunc/invalid_response_with_default (0.00s) --- PASS: TestPromptBoolInteractiveTemplateFunc/too_many_args (0.00s) === RUN TestPromptChoiceInteractiveTemplateFunc === RUN TestPromptChoiceInteractiveTemplateFunc/response_without_default === RUN TestPromptChoiceInteractiveTemplateFunc/response_with_default === RUN TestPromptChoiceInteractiveTemplateFunc/no_response_with_default === RUN TestPromptChoiceInteractiveTemplateFunc/invalid_response === RUN TestPromptChoiceInteractiveTemplateFunc/invalid_response_with_default === RUN TestPromptChoiceInteractiveTemplateFunc/too_many_args === RUN TestPromptChoiceInteractiveTemplateFunc/invalid_default --- PASS: TestPromptChoiceInteractiveTemplateFunc (0.01s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/response_without_default (0.00s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/response_with_default (0.00s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/no_response_with_default (0.00s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/invalid_response (0.00s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/invalid_response_with_default (0.00s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/too_many_args (0.00s) --- PASS: TestPromptChoiceInteractiveTemplateFunc/invalid_default (0.00s) === RUN TestPromptIntInteractiveTemplateFunc === RUN TestPromptIntInteractiveTemplateFunc/response_without_default === RUN TestPromptIntInteractiveTemplateFunc/response_with_default === RUN TestPromptIntInteractiveTemplateFunc/no_response_with_default === RUN TestPromptIntInteractiveTemplateFunc/invalid_response === RUN TestPromptIntInteractiveTemplateFunc/invalid_response_with_default === RUN TestPromptIntInteractiveTemplateFunc/too_many_args --- PASS: TestPromptIntInteractiveTemplateFunc (0.01s) --- PASS: TestPromptIntInteractiveTemplateFunc/response_without_default (0.00s) --- PASS: TestPromptIntInteractiveTemplateFunc/response_with_default (0.00s) --- PASS: TestPromptIntInteractiveTemplateFunc/no_response_with_default (0.00s) --- PASS: TestPromptIntInteractiveTemplateFunc/invalid_response (0.00s) --- PASS: TestPromptIntInteractiveTemplateFunc/invalid_response_with_default (0.00s) --- PASS: TestPromptIntInteractiveTemplateFunc/too_many_args (0.00s) === RUN TestPromptStringInteractiveTemplateFunc === RUN TestPromptStringInteractiveTemplateFunc/response_without_default === RUN TestPromptStringInteractiveTemplateFunc/response_with_default === RUN TestPromptStringInteractiveTemplateFunc/response_with_space_with_default === RUN TestPromptStringInteractiveTemplateFunc/no_response_with_default_with_space === RUN TestPromptStringInteractiveTemplateFunc/no_response_with_default === RUN TestPromptStringInteractiveTemplateFunc/whitespace_response_with_default === RUN TestPromptStringInteractiveTemplateFunc/too_many_args --- PASS: TestPromptStringInteractiveTemplateFunc (0.01s) --- PASS: TestPromptStringInteractiveTemplateFunc/response_without_default (0.00s) --- PASS: TestPromptStringInteractiveTemplateFunc/response_with_default (0.00s) --- PASS: TestPromptStringInteractiveTemplateFunc/response_with_space_with_default (0.00s) --- PASS: TestPromptStringInteractiveTemplateFunc/no_response_with_default_with_space (0.00s) --- PASS: TestPromptStringInteractiveTemplateFunc/no_response_with_default (0.00s) --- PASS: TestPromptStringInteractiveTemplateFunc/whitespace_response_with_default (0.00s) --- PASS: TestPromptStringInteractiveTemplateFunc/too_many_args (0.00s) === RUN TestKeepassxcParseOutput === RUN TestKeepassxcParseOutput/0 === RUN TestKeepassxcParseOutput/1 --- PASS: TestKeepassxcParseOutput (0.01s) --- PASS: TestKeepassxcParseOutput/0 (0.01s) --- PASS: TestKeepassxcParseOutput/1 (0.00s) === RUN TestKeepassxcTemplateFuncs keepassxctemplatefuncs_test.go:61: keepassxc-cli not found in $PATH --- SKIP: TestKeepassxcTemplateFuncs (0.00s) === RUN TestLastpassParseNote === RUN TestLastpassParseNote/0 === RUN TestLastpassParseNote/1 === RUN TestLastpassParseNote/2 --- PASS: TestLastpassParseNote (0.00s) --- PASS: TestLastpassParseNote/0 (0.00s) --- PASS: TestLastpassParseNote/1 (0.00s) --- PASS: TestLastpassParseNote/2 (0.00s) === RUN TestManagedCmd === RUN TestManagedCmd/simple === RUN TestManagedCmd/template === RUN TestManagedCmd/create_template === RUN TestManagedCmd/modify_template === RUN TestManagedCmd/remove === RUN TestManagedCmd/script_template === RUN TestManagedCmd/symlink_template === RUN TestManagedCmd/external_git_repo --- PASS: TestManagedCmd (0.12s) --- PASS: TestManagedCmd/simple (0.01s) --- PASS: TestManagedCmd/template (0.01s) --- PASS: TestManagedCmd/create_template (0.01s) --- PASS: TestManagedCmd/modify_template (0.01s) --- PASS: TestManagedCmd/remove (0.02s) --- PASS: TestManagedCmd/script_template (0.01s) --- PASS: TestManagedCmd/symlink_template (0.01s) --- PASS: TestManagedCmd/external_git_repo (0.02s) === RUN TestOnepasswordAccountMap === RUN TestOnepasswordAccountMap/single_account_without_shorthand === RUN TestOnepasswordAccountMap/single_account_with_shorthand === RUN TestOnepasswordAccountMap/multiple_unambiguous_accounts === RUN TestOnepasswordAccountMap/multiple_ambiguous_accounts --- PASS: TestOnepasswordAccountMap (0.00s) --- PASS: TestOnepasswordAccountMap/single_account_without_shorthand (0.00s) --- PASS: TestOnepasswordAccountMap/single_account_with_shorthand (0.00s) --- PASS: TestOnepasswordAccountMap/multiple_unambiguous_accounts (0.00s) --- PASS: TestOnepasswordAccountMap/multiple_ambiguous_accounts (0.00s) === RUN TestMakeNightriderFrames === RUN TestMakeNightriderFrames/0 === RUN TestMakeNightriderFrames/1 === RUN TestMakeNightriderFrames/2 === RUN TestMakeNightriderFrames/3 === RUN TestMakeNightriderFrames/4 === RUN TestMakeNightriderFrames/5 === RUN TestMakeNightriderFrames/6 --- PASS: TestMakeNightriderFrames (0.00s) --- PASS: TestMakeNightriderFrames/0 (0.00s) --- PASS: TestMakeNightriderFrames/1 (0.00s) --- PASS: TestMakeNightriderFrames/2 (0.00s) --- PASS: TestMakeNightriderFrames/3 (0.00s) --- PASS: TestMakeNightriderFrames/4 (0.00s) --- PASS: TestMakeNightriderFrames/5 (0.00s) --- PASS: TestMakeNightriderFrames/6 (0.00s) === RUN TestShellQuote --- PASS: TestShellQuote (0.00s) === RUN TestShellQuoteCommand --- PASS: TestShellQuoteCommand (0.00s) === RUN TestStatusCmd === RUN TestStatusCmd/add_file === RUN TestStatusCmd/add_file/0 === RUN TestStatusCmd/add_file/1 === RUN TestStatusCmd/add_file/2 === RUN TestStatusCmd/update_symlink === RUN TestStatusCmd/update_symlink/0 --- PASS: TestStatusCmd (0.08s) --- PASS: TestStatusCmd/add_file (0.04s) --- PASS: TestStatusCmd/add_file/0 (0.00s) --- PASS: TestStatusCmd/add_file/1 (0.00s) --- PASS: TestStatusCmd/add_file/2 (0.00s) --- PASS: TestStatusCmd/update_symlink (0.04s) --- PASS: TestStatusCmd/update_symlink/0 (0.00s) === RUN TestSymlinks === RUN TestSymlinks/symlink_forward_slash_unix === RUN TestSymlinks/symlink_forward_slash_unix/0 === RUN TestSymlinks/symlink_forward_slash_unix/1 === RUN TestSymlinks/symlink_forward_slash_windows symlinks_test.go:75: skipping Windows test on UNIX === RUN TestSymlinks/symlink_backward_slash_windows symlinks_test.go:75: skipping Windows test on UNIX === RUN TestSymlinks/symlink_mixed_slash_windows symlinks_test.go:75: skipping Windows test on UNIX --- PASS: TestSymlinks (0.04s) --- PASS: TestSymlinks/symlink_forward_slash_unix (0.03s) --- PASS: TestSymlinks/symlink_forward_slash_unix/0 (0.00s) --- PASS: TestSymlinks/symlink_forward_slash_unix/1 (0.00s) --- SKIP: TestSymlinks/symlink_forward_slash_windows (0.01s) --- SKIP: TestSymlinks/symlink_backward_slash_windows (0.00s) --- SKIP: TestSymlinks/symlink_mixed_slash_windows (0.00s) === RUN TestCommentTemplateFunc === RUN TestCommentTemplateFunc/0 === RUN TestCommentTemplateFunc/1 === RUN TestCommentTemplateFunc/2 === RUN TestCommentTemplateFunc/3 === RUN TestCommentTemplateFunc/4 === RUN TestCommentTemplateFunc/5 === RUN TestCommentTemplateFunc/6 --- PASS: TestCommentTemplateFunc (0.00s) --- PASS: TestCommentTemplateFunc/0 (0.00s) --- PASS: TestCommentTemplateFunc/1 (0.00s) --- PASS: TestCommentTemplateFunc/2 (0.00s) --- PASS: TestCommentTemplateFunc/3 (0.00s) --- PASS: TestCommentTemplateFunc/4 (0.00s) --- PASS: TestCommentTemplateFunc/5 (0.00s) --- PASS: TestCommentTemplateFunc/6 (0.00s) === RUN TestDeleteValueAtPathTemplateFunc === RUN TestDeleteValueAtPathTemplateFunc/empty === RUN TestDeleteValueAtPathTemplateFunc/outer === RUN TestDeleteValueAtPathTemplateFunc/inner === RUN TestDeleteValueAtPathTemplateFunc/missing === RUN TestDeleteValueAtPathTemplateFunc/missing_inner === RUN TestDeleteValueAtPathTemplateFunc/missing_depth2 === RUN TestDeleteValueAtPathTemplateFunc/not_an_inner_dict --- PASS: TestDeleteValueAtPathTemplateFunc (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/empty (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/outer (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/inner (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/missing (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/missing_inner (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/missing_depth2 (0.00s) --- PASS: TestDeleteValueAtPathTemplateFunc/not_an_inner_dict (0.00s) === RUN TestFromJson === RUN TestFromJson/0 === RUN TestFromJson/1 === RUN TestFromJson/2 === RUN TestFromJson/3 === RUN TestFromJson/4 === RUN TestFromJson/5 --- PASS: TestFromJson (0.00s) --- PASS: TestFromJson/0 (0.00s) --- PASS: TestFromJson/1 (0.00s) --- PASS: TestFromJson/2 (0.00s) --- PASS: TestFromJson/3 (0.00s) --- PASS: TestFromJson/4 (0.00s) --- PASS: TestFromJson/5 (0.00s) === RUN TestPruneEmptyDicts === RUN TestPruneEmptyDicts/nil === RUN TestPruneEmptyDicts/empty === RUN TestPruneEmptyDicts/nested_empty --- PASS: TestPruneEmptyDicts (0.00s) --- PASS: TestPruneEmptyDicts/nil (0.00s) --- PASS: TestPruneEmptyDicts/empty (0.00s) --- PASS: TestPruneEmptyDicts/nested_empty (0.00s) === RUN TestSetValueAtPathTemplateFunc === RUN TestSetValueAtPathTemplateFunc/simple === RUN TestSetValueAtPathTemplateFunc/create_map === RUN TestSetValueAtPathTemplateFunc/modify_map === RUN TestSetValueAtPathTemplateFunc/create_nested_map === RUN TestSetValueAtPathTemplateFunc/modify_nested_map === RUN TestSetValueAtPathTemplateFunc/replace_map === RUN TestSetValueAtPathTemplateFunc/replace_nested_map === RUN TestSetValueAtPathTemplateFunc/replace_nested_value === RUN TestSetValueAtPathTemplateFunc/string_list_path === RUN TestSetValueAtPathTemplateFunc/any_list_path === RUN TestSetValueAtPathTemplateFunc/invalid_path === RUN TestSetValueAtPathTemplateFunc/invalid_path_element --- PASS: TestSetValueAtPathTemplateFunc (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/simple (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/create_map (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/modify_map (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/create_nested_map (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/modify_nested_map (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/replace_map (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/replace_nested_map (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/replace_nested_value (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/string_list_path (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/any_list_path (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/invalid_path (0.00s) --- PASS: TestSetValueAtPathTemplateFunc/invalid_path_element (0.00s) === RUN TestFromIniTemplateFunc === RUN TestFromIniTemplateFunc/0 === RUN TestFromIniTemplateFunc/1 === RUN TestFromIniTemplateFunc/2 --- PASS: TestFromIniTemplateFunc (0.00s) --- PASS: TestFromIniTemplateFunc/0 (0.00s) --- PASS: TestFromIniTemplateFunc/1 (0.00s) --- PASS: TestFromIniTemplateFunc/2 (0.00s) === RUN TestKeysFromPath === RUN TestKeysFromPath/string_key === RUN TestKeysFromPath/string_period_separated_keys === RUN TestKeysFromPath/string_period_separated_nested_keys === RUN TestKeysFromPath/string_empty === RUN TestKeysFromPath/string_period_separated_empty_key === RUN TestKeysFromPath/string_slice_one_key === RUN TestKeysFromPath/string_slice_two_keys === RUN TestKeysFromPath/string_slice_multiple_keys === RUN TestKeysFromPath/string_slice_empty === RUN TestKeysFromPath/string_slice_empty_key === RUN TestKeysFromPath/string_slice_empty_key_second === RUN TestKeysFromPath/any_slice_nil === RUN TestKeysFromPath/any_slice_empty === RUN TestKeysFromPath/any_slice_one_key === RUN TestKeysFromPath/any_slice_two_keys === RUN TestKeysFromPath/any_slice_invalid_key === RUN TestKeysFromPath/any_slice_empty_key --- PASS: TestKeysFromPath (0.00s) --- PASS: TestKeysFromPath/string_key (0.00s) --- PASS: TestKeysFromPath/string_period_separated_keys (0.00s) --- PASS: TestKeysFromPath/string_period_separated_nested_keys (0.00s) --- PASS: TestKeysFromPath/string_empty (0.00s) --- PASS: TestKeysFromPath/string_period_separated_empty_key (0.00s) --- PASS: TestKeysFromPath/string_slice_one_key (0.00s) --- PASS: TestKeysFromPath/string_slice_two_keys (0.00s) --- PASS: TestKeysFromPath/string_slice_multiple_keys (0.00s) --- PASS: TestKeysFromPath/string_slice_empty (0.00s) --- PASS: TestKeysFromPath/string_slice_empty_key (0.00s) --- PASS: TestKeysFromPath/string_slice_empty_key_second (0.00s) --- PASS: TestKeysFromPath/any_slice_nil (0.00s) --- PASS: TestKeysFromPath/any_slice_empty (0.00s) --- PASS: TestKeysFromPath/any_slice_one_key (0.00s) --- PASS: TestKeysFromPath/any_slice_two_keys (0.00s) --- PASS: TestKeysFromPath/any_slice_invalid_key (0.00s) --- PASS: TestKeysFromPath/any_slice_empty_key (0.00s) === RUN TestNestedMapAtPath === RUN TestNestedMapAtPath/simple === RUN TestNestedMapAtPath/nested_map === RUN TestNestedMapAtPath/not_a_map === RUN TestNestedMapAtPath/nested_not_a_map === RUN TestNestedMapAtPath/empty_path --- PASS: TestNestedMapAtPath (0.00s) --- PASS: TestNestedMapAtPath/simple (0.00s) --- PASS: TestNestedMapAtPath/nested_map (0.00s) --- PASS: TestNestedMapAtPath/not_a_map (0.00s) --- PASS: TestNestedMapAtPath/nested_not_a_map (0.00s) --- PASS: TestNestedMapAtPath/empty_path (0.00s) === RUN TestToIniTemplateFunc === RUN TestToIniTemplateFunc/0 === RUN TestToIniTemplateFunc/1 === RUN TestToIniTemplateFunc/2 === RUN TestToIniTemplateFunc/3 === RUN TestToIniTemplateFunc/4 === RUN TestToIniTemplateFunc/5 --- PASS: TestToIniTemplateFunc (0.00s) --- PASS: TestToIniTemplateFunc/0 (0.00s) --- PASS: TestToIniTemplateFunc/1 (0.00s) --- PASS: TestToIniTemplateFunc/2 (0.00s) --- PASS: TestToIniTemplateFunc/3 (0.00s) --- PASS: TestToIniTemplateFunc/4 (0.00s) --- PASS: TestToIniTemplateFunc/5 (0.00s) === RUN TestNeedsQuote === RUN TestNeedsQuote/0 === RUN TestNeedsQuote/1 === RUN TestNeedsQuote/2 === RUN TestNeedsQuote/3 === RUN TestNeedsQuote/4 === RUN TestNeedsQuote/5 --- PASS: TestNeedsQuote (0.00s) --- PASS: TestNeedsQuote/0 (0.00s) --- PASS: TestNeedsQuote/1 (0.00s) --- PASS: TestNeedsQuote/2 (0.00s) --- PASS: TestNeedsQuote/3 (0.00s) --- PASS: TestNeedsQuote/4 (0.00s) --- PASS: TestNeedsQuote/5 (0.00s) === RUN TestQuoteListTemplateFunc --- PASS: TestQuoteListTemplateFunc (0.00s) === RUN TestConfigGetPackageFilename === RUN TestConfigGetPackageFilename/chezmoi_2.0.0_linux_amd64.apk === RUN TestConfigGetPackageFilename/chezmoi_2.0.0_linux_i386.deb === RUN TestConfigGetPackageFilename/chezmoi_2.0.0_linux_amd64.deb === RUN TestConfigGetPackageFilename/chezmoi_2.0.0_linux_armel.deb === RUN TestConfigGetPackageFilename/chezmoi_2.0.0_linux_arm64.deb === RUN TestConfigGetPackageFilename/chezmoi-2.0.0-i686.rpm === RUN TestConfigGetPackageFilename/chezmoi-2.0.0-x86_64.rpm === RUN TestConfigGetPackageFilename/chezmoi-2.0.0-armhfp.rpm === RUN TestConfigGetPackageFilename/chezmoi-2.0.0-aarch64.rpm === RUN TestConfigGetPackageFilename/chezmoi-2.0.0-ppc64.rpm === RUN TestConfigGetPackageFilename/chezmoi-2.0.0-ppc64le.rpm --- PASS: TestConfigGetPackageFilename (0.01s) --- PASS: TestConfigGetPackageFilename/chezmoi_2.0.0_linux_amd64.apk (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi_2.0.0_linux_i386.deb (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi_2.0.0_linux_amd64.deb (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi_2.0.0_linux_armel.deb (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi_2.0.0_linux_arm64.deb (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi-2.0.0-i686.rpm (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi-2.0.0-x86_64.rpm (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi-2.0.0-armhfp.rpm (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi-2.0.0-aarch64.rpm (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi-2.0.0-ppc64.rpm (0.00s) --- PASS: TestConfigGetPackageFilename/chezmoi-2.0.0-ppc64le.rpm (0.00s) === RUN TestCamelCaseToUpperSnakeCase === RUN TestCamelCaseToUpperSnakeCase/#00 === RUN TestCamelCaseToUpperSnakeCase/camel === RUN TestCamelCaseToUpperSnakeCase/camelCase === RUN TestCamelCaseToUpperSnakeCase/bugReportURL --- PASS: TestCamelCaseToUpperSnakeCase (0.00s) --- PASS: TestCamelCaseToUpperSnakeCase/#00 (0.00s) --- PASS: TestCamelCaseToUpperSnakeCase/camel (0.00s) --- PASS: TestCamelCaseToUpperSnakeCase/camelCase (0.00s) --- PASS: TestCamelCaseToUpperSnakeCase/bugReportURL (0.00s) === RUN TestEnglishList --- PASS: TestEnglishList (0.00s) === RUN TestEnglishListWithNoun --- PASS: TestEnglishListWithNoun (0.00s) === RUN TestUpperSnakeCaseToCamelCaseMap --- PASS: TestUpperSnakeCaseToCamelCaseMap (0.00s) === RUN TestVerifyCmd === RUN TestVerifyCmd/empty === RUN TestVerifyCmd/file --- PASS: TestVerifyCmd (0.02s) --- PASS: TestVerifyCmd/empty (0.01s) --- PASS: TestVerifyCmd/file (0.01s) === RUN TestScript === RUN TestScript/add === PAUSE TestScript/add === RUN TestScript/addattributes === PAUSE TestScript/addattributes === RUN TestScript/addautotemplate === PAUSE TestScript/addautotemplate === RUN TestScript/addencrypted === PAUSE TestScript/addencrypted === RUN TestScript/addsecrets === PAUSE TestScript/addsecrets === RUN TestScript/age === PAUSE TestScript/age === RUN TestScript/ageencryption === PAUSE TestScript/ageencryption === RUN TestScript/ageencryptionsymmetric === PAUSE TestScript/ageencryptionsymmetric === RUN TestScript/apply === PAUSE TestScript/apply === RUN TestScript/applychmod_unix === PAUSE TestScript/applychmod_unix === RUN TestScript/applyexact === PAUSE TestScript/applyexact === RUN TestScript/applyremove === PAUSE TestScript/applyremove === RUN TestScript/applyskipencrypted === PAUSE TestScript/applyskipencrypted === RUN TestScript/applysourcepath === PAUSE TestScript/applysourcepath === RUN TestScript/applystate === PAUSE TestScript/applystate === RUN TestScript/applytype === PAUSE TestScript/applytype === RUN TestScript/applyverbose === PAUSE TestScript/applyverbose === RUN TestScript/archivetar === PAUSE TestScript/archivetar === RUN TestScript/archivezip === PAUSE TestScript/archivezip === RUN TestScript/autocommit === PAUSE TestScript/autocommit === RUN TestScript/autopush === PAUSE TestScript/autopush === RUN TestScript/bitwarden === PAUSE TestScript/bitwarden === RUN TestScript/builtinage === PAUSE TestScript/builtinage === RUN TestScript/builtingit === PAUSE TestScript/builtingit === RUN TestScript/cat === PAUSE TestScript/cat === RUN TestScript/catconfig === PAUSE TestScript/catconfig === RUN TestScript/cd_unix === PAUSE TestScript/cd_unix === RUN TestScript/cd_windows === PAUSE TestScript/cd_windows === RUN TestScript/chattr === PAUSE TestScript/chattr === RUN TestScript/chattrencrypted === PAUSE TestScript/chattrencrypted === RUN TestScript/completion === PAUSE TestScript/completion === RUN TestScript/completion_unix === PAUSE TestScript/completion_unix === RUN TestScript/config === PAUSE TestScript/config === RUN TestScript/configstate === PAUSE TestScript/configstate === RUN TestScript/create === PAUSE TestScript/create === RUN TestScript/dashlane === PAUSE TestScript/dashlane === RUN TestScript/data === PAUSE TestScript/data === RUN TestScript/debug === PAUSE TestScript/debug === RUN TestScript/diff === PAUSE TestScript/diff === RUN TestScript/diffcommand_unix === PAUSE TestScript/diffcommand_unix === RUN TestScript/diffcommand_windows === PAUSE TestScript/diffcommand_windows === RUN TestScript/doctor_unix === PAUSE TestScript/doctor_unix === RUN TestScript/doctor_windows === PAUSE TestScript/doctor_windows === RUN TestScript/doppler === PAUSE TestScript/doppler === RUN TestScript/dumpconfig === PAUSE TestScript/dumpconfig === RUN TestScript/dumpjson === PAUSE TestScript/dumpjson === RUN TestScript/dumpyaml === PAUSE TestScript/dumpyaml === RUN TestScript/edgecases === PAUSE TestScript/edgecases === RUN TestScript/edgecasesumask === PAUSE TestScript/edgecasesumask === RUN TestScript/edit === PAUSE TestScript/edit === RUN TestScript/editconfig === PAUSE TestScript/editconfig === RUN TestScript/editconfigtemplate === PAUSE TestScript/editconfigtemplate === RUN TestScript/edithardlink === PAUSE TestScript/edithardlink === RUN TestScript/ejson === PAUSE TestScript/ejson === RUN TestScript/encryptiontemplatefuncs === PAUSE TestScript/encryptiontemplatefuncs === RUN TestScript/errors === PAUSE TestScript/errors === RUN TestScript/exclude === PAUSE TestScript/exclude === RUN TestScript/executetemplate === PAUSE TestScript/executetemplate === RUN TestScript/external === PAUSE TestScript/external === RUN TestScript/externalarchiveinclude === PAUSE TestScript/externalarchiveinclude === RUN TestScript/externaldiff === PAUSE TestScript/externaldiff === RUN TestScript/externaldir === PAUSE TestScript/externaldir === RUN TestScript/externalencrypted === PAUSE TestScript/externalencrypted === RUN TestScript/externalfilter === PAUSE TestScript/externalfilter === RUN TestScript/externalgitrepo === PAUSE TestScript/externalgitrepo === RUN TestScript/externalguess === PAUSE TestScript/externalguess === RUN TestScript/externalzip === PAUSE TestScript/externalzip === RUN TestScript/forget === PAUSE TestScript/forget === RUN TestScript/generate === PAUSE TestScript/generate === RUN TestScript/generatefigspec === PAUSE TestScript/generatefigspec === RUN TestScript/git === PAUSE TestScript/git === RUN TestScript/githubtemplatefuncs === PAUSE TestScript/githubtemplatefuncs === RUN TestScript/gopass === PAUSE TestScript/gopass === RUN TestScript/gpg === PAUSE TestScript/gpg === RUN TestScript/gpgencryption === PAUSE TestScript/gpgencryption === RUN TestScript/gpgencryptionsymmetric === PAUSE TestScript/gpgencryptionsymmetric === RUN TestScript/hcpvaultsecrets === PAUSE TestScript/hcpvaultsecrets === RUN TestScript/help === PAUSE TestScript/help === RUN TestScript/hooks === PAUSE TestScript/hooks === RUN TestScript/ignore === PAUSE TestScript/ignore === RUN TestScript/ignored === PAUSE TestScript/ignored === RUN TestScript/import === PAUSE TestScript/import === RUN TestScript/importtarzst === PAUSE TestScript/importtarzst === RUN TestScript/importxz === PAUSE TestScript/importxz === RUN TestScript/importzip === PAUSE TestScript/importzip === RUN TestScript/init === PAUSE TestScript/init === RUN TestScript/initconfig === PAUSE TestScript/initconfig === RUN TestScript/inittemplatefuncs === PAUSE TestScript/inittemplatefuncs === RUN TestScript/issue1161 === PAUSE TestScript/issue1161 === RUN TestScript/issue1213 === PAUSE TestScript/issue1213 === RUN TestScript/issue1237 === PAUSE TestScript/issue1237 === RUN TestScript/issue1365 === PAUSE TestScript/issue1365 === RUN TestScript/issue1666 === PAUSE TestScript/issue1666 === RUN TestScript/issue1794 === PAUSE TestScript/issue1794 === RUN TestScript/issue1832 === PAUSE TestScript/issue1832 === RUN TestScript/issue1866 === PAUSE TestScript/issue1866 === RUN TestScript/issue1869 === PAUSE TestScript/issue1869 === RUN TestScript/issue2016 === PAUSE TestScript/issue2016 === RUN TestScript/issue2092 === PAUSE TestScript/issue2092 === RUN TestScript/issue2132 === PAUSE TestScript/issue2132 === RUN TestScript/issue2137 === PAUSE TestScript/issue2137 === RUN TestScript/issue2177 === PAUSE TestScript/issue2177 === RUN TestScript/issue2283 === PAUSE TestScript/issue2283 === RUN TestScript/issue2300 === PAUSE TestScript/issue2300 === RUN TestScript/issue2302 === PAUSE TestScript/issue2302 === RUN TestScript/issue2315 === PAUSE TestScript/issue2315 === RUN TestScript/issue2354 === PAUSE TestScript/issue2354 === RUN TestScript/issue2380 === PAUSE TestScript/issue2380 === RUN TestScript/issue2427 === PAUSE TestScript/issue2427 === RUN TestScript/issue2500 === PAUSE TestScript/issue2500 === RUN TestScript/issue2510 === PAUSE TestScript/issue2510 === RUN TestScript/issue2573 === PAUSE TestScript/issue2573 === RUN TestScript/issue2577 === PAUSE TestScript/issue2577 === RUN TestScript/issue2599 === PAUSE TestScript/issue2599 === RUN TestScript/issue2609 === PAUSE TestScript/issue2609 === RUN TestScript/issue2628 === PAUSE TestScript/issue2628 === RUN TestScript/issue2649 === PAUSE TestScript/issue2649 === RUN TestScript/issue2695 === PAUSE TestScript/issue2695 === RUN TestScript/issue2752 === PAUSE TestScript/issue2752 === RUN TestScript/issue2820 === PAUSE TestScript/issue2820 === RUN TestScript/issue2858 === PAUSE TestScript/issue2858 === RUN TestScript/issue2861 === PAUSE TestScript/issue2861 === RUN TestScript/issue2865 === PAUSE TestScript/issue2865 === RUN TestScript/issue2934 === PAUSE TestScript/issue2934 === RUN TestScript/issue2937 === PAUSE TestScript/issue2937 === RUN TestScript/issue2942 === PAUSE TestScript/issue2942 === RUN TestScript/issue2954 === PAUSE TestScript/issue2954 === RUN TestScript/issue2964 === PAUSE TestScript/issue2964 === RUN TestScript/issue2977 === PAUSE TestScript/issue2977 === RUN TestScript/issue2995 === PAUSE TestScript/issue2995 === RUN TestScript/issue3005 === PAUSE TestScript/issue3005 === RUN TestScript/issue3008 === PAUSE TestScript/issue3008 === RUN TestScript/issue3051 === PAUSE TestScript/issue3051 === RUN TestScript/issue3064 === PAUSE TestScript/issue3064 === RUN TestScript/issue3113 === PAUSE TestScript/issue3113 === RUN TestScript/issue3126 === PAUSE TestScript/issue3126 === RUN TestScript/issue3127 === PAUSE TestScript/issue3127 === RUN TestScript/issue3163 === PAUSE TestScript/issue3163 === RUN TestScript/issue3206 === PAUSE TestScript/issue3206 === RUN TestScript/issue3232 === PAUSE TestScript/issue3232 === RUN TestScript/issue3240 === PAUSE TestScript/issue3240 === RUN TestScript/issue3257 === PAUSE TestScript/issue3257 === RUN TestScript/issue3268 === PAUSE TestScript/issue3268 === RUN TestScript/issue3325 === PAUSE TestScript/issue3325 === RUN TestScript/issue3349 === PAUSE TestScript/issue3349 === RUN TestScript/issue3371 === PAUSE TestScript/issue3371 === RUN TestScript/issue3374 === PAUSE TestScript/issue3374 === RUN TestScript/issue3414 === PAUSE TestScript/issue3414 === RUN TestScript/issue3415 === PAUSE TestScript/issue3415 === RUN TestScript/issue3418 === PAUSE TestScript/issue3418 === RUN TestScript/issue3421 === PAUSE TestScript/issue3421 === RUN TestScript/issue3510 === PAUSE TestScript/issue3510 === RUN TestScript/issue796 === PAUSE TestScript/issue796 === RUN TestScript/keepassxc === PAUSE TestScript/keepassxc === RUN TestScript/keeper === PAUSE TestScript/keeper === RUN TestScript/keepgoing === PAUSE TestScript/keepgoing === RUN TestScript/lastpass === PAUSE TestScript/lastpass === RUN TestScript/license === PAUSE TestScript/license === RUN TestScript/literal === PAUSE TestScript/literal === RUN TestScript/mackupbrew_darwin === PAUSE TestScript/mackupbrew_darwin === RUN TestScript/mackupmacports_darwin === PAUSE TestScript/mackupmacports_darwin === RUN TestScript/mackuppip_darwin === PAUSE TestScript/mackuppip_darwin === RUN TestScript/mackuppipx_darwin === PAUSE TestScript/mackuppipx_darwin === RUN TestScript/managed === PAUSE TestScript/managed === RUN TestScript/merge_unix === PAUSE TestScript/merge_unix === RUN TestScript/mergeall_unix === PAUSE TestScript/mergeall_unix === RUN TestScript/mergeencryptedage_unix === PAUSE TestScript/mergeencryptedage_unix === RUN TestScript/mergeencryptedgpg_unix === PAUSE TestScript/mergeencryptedgpg_unix === RUN TestScript/modesymlink === PAUSE TestScript/modesymlink === RUN TestScript/modify_unix === PAUSE TestScript/modify_unix === RUN TestScript/modify_windows === PAUSE TestScript/modify_windows === RUN TestScript/modifyencrypted === PAUSE TestScript/modifyencrypted === RUN TestScript/modifypython_windows === PAUSE TestScript/modifypython_windows === RUN TestScript/noencryption === PAUSE TestScript/noencryption === RUN TestScript/nosourcedir === PAUSE TestScript/nosourcedir === RUN TestScript/onepassword2 === PAUSE TestScript/onepassword2 === RUN TestScript/options === PAUSE TestScript/options === RUN TestScript/pass === PAUSE TestScript/pass === RUN TestScript/passhole === PAUSE TestScript/passhole === RUN TestScript/plugin === PAUSE TestScript/plugin === RUN TestScript/purge === PAUSE TestScript/purge === RUN TestScript/rbw === PAUSE TestScript/rbw === RUN TestScript/re-add === PAUSE TestScript/re-add === RUN TestScript/remove === PAUSE TestScript/remove === RUN TestScript/removedir === PAUSE TestScript/removedir === RUN TestScript/root === PAUSE TestScript/root === RUN TestScript/runscriptdir_unix === PAUSE TestScript/runscriptdir_unix === RUN TestScript/script === PAUSE TestScript/script === RUN TestScript/script_unix === PAUSE TestScript/script_unix === RUN TestScript/script_windows === PAUSE TestScript/script_windows === RUN TestScript/scriptenv === PAUSE TestScript/scriptenv === RUN TestScript/scriptinterpreters_windows === PAUSE TestScript/scriptinterpreters_windows === RUN TestScript/scriptinterpreterstemplate === PAUSE TestScript/scriptinterpreterstemplate === RUN TestScript/scriptonce_unix === PAUSE TestScript/scriptonce_unix === RUN TestScript/scriptonce_windows === PAUSE TestScript/scriptonce_windows === RUN TestScript/scriptonchange_unix === PAUSE TestScript/scriptonchange_unix === RUN TestScript/scriptorder_unix === PAUSE TestScript/scriptorder_unix === RUN TestScript/scriptorder_windows === PAUSE TestScript/scriptorder_windows === RUN TestScript/scriptperl === PAUSE TestScript/scriptperl === RUN TestScript/scriptpython === PAUSE TestScript/scriptpython === RUN TestScript/scriptruby === PAUSE TestScript/scriptruby === RUN TestScript/scriptsdir_unix === PAUSE TestScript/scriptsdir_unix === RUN TestScript/scriptsubdir_unix === PAUSE TestScript/scriptsubdir_unix === RUN TestScript/scriptsubdir_windows === PAUSE TestScript/scriptsubdir_windows === RUN TestScript/scripttempdir === PAUSE TestScript/scripttempdir === RUN TestScript/secret === PAUSE TestScript/secret === RUN TestScript/sourcedir === PAUSE TestScript/sourcedir === RUN TestScript/sourcepath === PAUSE TestScript/sourcepath === RUN TestScript/state === PAUSE TestScript/state === RUN TestScript/state_unix === PAUSE TestScript/state_unix === RUN TestScript/state_windows === PAUSE TestScript/state_windows === RUN TestScript/status === PAUSE TestScript/status === RUN TestScript/symlinks === PAUSE TestScript/symlinks === RUN TestScript/symlinks_windows === PAUSE TestScript/symlinks_windows === RUN TestScript/targetpath === PAUSE TestScript/targetpath === RUN TestScript/templatedata === PAUSE TestScript/templatedata === RUN TestScript/templatedirectives === PAUSE TestScript/templatedirectives === RUN TestScript/templatefuncs === PAUSE TestScript/templatefuncs === RUN TestScript/templatevars === PAUSE TestScript/templatevars === RUN TestScript/textconv === PAUSE TestScript/textconv === RUN TestScript/tilde === PAUSE TestScript/tilde === RUN TestScript/umask_unix === PAUSE TestScript/umask_unix === RUN TestScript/unmanaged === PAUSE TestScript/unmanaged === RUN TestScript/update === PAUSE TestScript/update === RUN TestScript/upgrade === PAUSE TestScript/upgrade === RUN TestScript/vault === PAUSE TestScript/vault === RUN TestScript/verify === PAUSE TestScript/verify === RUN TestScript/version === PAUSE TestScript/version === RUN TestScript/workingtree === PAUSE TestScript/workingtree === CONT TestScript/runscriptdir_unix === CONT TestScript/textconv === CONT TestScript/state_unix === CONT TestScript/mackupbrew_darwin === CONT TestScript/pass === CONT TestScript/upgrade === CONT TestScript/scriptruby === CONT TestScript/unmanaged === CONT TestScript/ignored === CONT TestScript/add === CONT TestScript/applyverbose === NAME TestScript/upgrade cmd.go:381: $CHEZMOI_GITHUB_TOKEN not set testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!env:CHEZMOI_GITHUB_TOKEN] skip '$CHEZMOI_GITHUB_TOKEN not set' === CONT TestScript/autopush === CONT TestScript/executetemplate === CONT TestScript/externaldiff === CONT TestScript/scriptorder_windows === CONT TestScript/applyremove === CONT TestScript/root === CONT TestScript/removedir === CONT TestScript/templatedata === CONT TestScript/remove === CONT TestScript/re-add === NAME TestScript/scriptorder_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === CONT TestScript/targetpath === CONT TestScript/rbw === CONT TestScript/symlinks_windows === CONT TestScript/chattrencrypted === CONT TestScript/purge === CONT TestScript/symlinks === NAME TestScript/symlinks_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === CONT TestScript/plugin === NAME TestScript/scriptruby cmd.go:381: ruby not found in $PATH === CONT TestScript/status === NAME TestScript/scriptruby testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:ruby] skip 'ruby not found in $PATH' === CONT TestScript/state_windows === CONT TestScript/passhole === CONT TestScript/options === CONT TestScript/onepassword2 === CONT TestScript/nosourcedir === CONT TestScript/noencryption === CONT TestScript/modifypython_windows === CONT TestScript/modifyencrypted === CONT TestScript/modify_windows === CONT TestScript/modify_unix === CONT TestScript/modesymlink === CONT TestScript/mergeencryptedgpg_unix === CONT TestScript/mergeencryptedage_unix === CONT TestScript/mergeall_unix === CONT TestScript/merge_unix === CONT TestScript/managed === CONT TestScript/mackuppipx_darwin === CONT TestScript/mackuppip_darwin === CONT TestScript/mackupmacports_darwin === CONT TestScript/scriptsubdir_unix === CONT TestScript/scriptsdir_unix === CONT TestScript/update === CONT TestScript/applyexact === CONT TestScript/autocommit === CONT TestScript/archivezip === CONT TestScript/archivetar === CONT TestScript/ignore === CONT TestScript/templatedirectives === CONT TestScript/hooks === CONT TestScript/applytype === CONT TestScript/help === CONT TestScript/diffcommand_windows === CONT TestScript/applystate === CONT TestScript/externalarchiveinclude === CONT TestScript/hcpvaultsecrets === CONT TestScript/applysourcepath === CONT TestScript/external === CONT TestScript/applyskipencrypted === CONT TestScript/gpgencryptionsymmetric === CONT TestScript/gpgencryption === CONT TestScript/gpg === CONT TestScript/script_unix === CONT TestScript/templatevars === CONT TestScript/gopass === CONT TestScript/scriptonchange_unix === CONT TestScript/githubtemplatefuncs === CONT TestScript/scriptorder_unix === CONT TestScript/git === CONT TestScript/version === CONT TestScript/generatefigspec === CONT TestScript/workingtree === CONT TestScript/generate === CONT TestScript/addsecrets === CONT TestScript/forget === CONT TestScript/applychmod_unix === CONT TestScript/externalzip === CONT TestScript/apply === CONT TestScript/externalguess === CONT TestScript/externalgitrepo === CONT TestScript/ageencryptionsymmetric === CONT TestScript/externalfilter === CONT TestScript/scriptsubdir_windows === CONT TestScript/externalencrypted === CONT TestScript/ageencryption === CONT TestScript/scriptinterpreterstemplate === CONT TestScript/age === CONT TestScript/script_windows === CONT TestScript/externaldir === CONT TestScript/sourcepath === CONT TestScript/scriptonce_windows === CONT TestScript/issue3240 === CONT TestScript/sourcedir === CONT TestScript/script === CONT TestScript/literal === CONT TestScript/secret === CONT TestScript/scriptonce_unix === CONT TestScript/license === CONT TestScript/addattributes === CONT TestScript/scripttempdir === CONT TestScript/addencrypted === CONT TestScript/lastpass === CONT TestScript/issue3415 === CONT TestScript/tilde === CONT TestScript/issue3414 === CONT TestScript/umask_unix === CONT TestScript/keepgoing === CONT TestScript/issue3349 === CONT TestScript/issue3325 === CONT TestScript/keeper === CONT TestScript/state === CONT TestScript/issue3268 === CONT TestScript/keepassxc === CONT TestScript/issue3257 === CONT TestScript/edit === CONT TestScript/catconfig === CONT TestScript/completion === CONT TestScript/issue3374 === CONT TestScript/issue2858 === CONT TestScript/scriptinterpreters_windows === CONT TestScript/templatefuncs === CONT TestScript/exclude === NAME TestScript/mackupbrew_darwin cmd.go:381: Darwin only === CONT TestScript/errors === CONT TestScript/chattr === NAME TestScript/mackupbrew_darwin testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!darwin] skip 'Darwin only' === NAME TestScript/modifyencrypted cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!exec:age] skip 'age not found in $PATH' === NAME TestScript/mergeencryptedage_unix cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!exec:age] skip 'age not found in $PATH' === NAME TestScript/archivezip cmd.go:381: unzip not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'windows line endings confuse cmp and diff' > [!exec:unzip] skip 'unzip not found in $PATH' === NAME TestScript/ageencryption cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' === NAME TestScript/modify_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/chattrencrypted cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' === NAME TestScript/ageencryptionsymmetric cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' === CONT TestScript/encryptiontemplatefuncs gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir250844916/pubring.kbx' created gpg: /tmp/test-gpg-homedir250844916/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir250844916/openpgp-revocs.d' created === NAME TestScript/scriptinterpreterstemplate cmd.go:381: python3 not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:python3] skip 'python3 not found in $PATH' === NAME TestScript/githubtemplatefuncs cmd.go:381: $CHEZMOI_GITHUB_TOKEN not set === NAME TestScript/scriptonce_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === CONT TestScript/cd_windows === NAME TestScript/git testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/git > [windows] unix2dos bin/git.cmd > exec chezmoi git hello [stdout] hello > exists $CHEZMOISOURCEDIR > stdout hello PASS === NAME TestScript/cd_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/githubtemplatefuncs testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!env:CHEZMOI_GITHUB_TOKEN] skip '$CHEZMOI_GITHUB_TOKEN not set' === CONT TestScript/ejson === CONT TestScript/cd_unix gpg: revocation certificate stored as '/tmp/test-gpg-homedir250844916/openpgp-revocs.d/C57B818CF809064BC708F365D56FC932C248D467.rev' === CONT TestScript/edithardlink === NAME TestScript/state_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/scriptsubdir_windows cmd.go:381: Windows only === CONT TestScript/dashlane === CONT TestScript/addautotemplate === CONT TestScript/editconfigtemplate === NAME TestScript/scriptsubdir_windows testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/ignored testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test that chezmoi ignored prints the list of ignored paths (1.762s) > exec chezmoi ignored [stdout] .dir/file .dir/subdir .readonly .template > cmp stdout golden/ignored PASS gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir309041386/pubring.kbx' created === CONT TestScript/diffcommand_unix === NAME TestScript/encryptiontemplatefuncs cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir1860641310/pubring.kbx' created === CONT TestScript/diff === CONT TestScript/editconfig === CONT TestScript/debug cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' === CONT TestScript/data === CONT TestScript/builtingit === CONT TestScript/cat === NAME TestScript/nosourcedir gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir2242230989/pubring.kbx' created gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir2434846373/pubring.kbx' created testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply returns an error if the source directory does not exist (2.141s) > ! exec chezmoi apply [stderr] chezmoi: stat $WORK/home/user/.local/share/chezmoi: no such file or directory [exit status 1] > [unix] stderr 'no such file or directory' > [windows] stderr 'The system cannot find the path specified' PASS === CONT TestScript/issue3371 === CONT TestScript/configstate === NAME TestScript/diffcommand_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/mackupmacports_darwin cmd.go:381: Darwin only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!darwin] skip 'Darwin only' === NAME TestScript/generatefigspec testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi generate-fig-spec generates a Fig spec (2.077s) > exec chezmoi generate-fig-spec [stdout] const completionSpec: Fig.Spec = {name: "chezmoi",description: "Manage your dotfiles across multiple diverse machines, securely",subcommands: [{name: ["manage","add",],description: "Add an existing file, directory, or symlink to the source state",options: [{name: ["--autotemplate","-a",],description: "Generate the template when adding files as templates",},{name: ["--create",],description: "Add files that should exist, irrespective of their contents",},{name: ["--encrypt",],description: "Encrypt files",},{name: ["--exact",],description: "Add directories exactly",},{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--follow","-f",],description: "Add symlink targets instead of symlinks",},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--prompt","-p",],description: "Prompt before adding each entry",},{name: ["--quiet","-q",],description: "Suppress warnings",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},{name: ["--secrets",],description: "Scan for secrets when adding unencrypted files",args: [{name: "secrets",default: "warning",},],},{name: ["--template","-T",],description: "Add files as templates",},{name: ["--template-symlinks",],description: "Add symlinks with target in source or home dirs as templates",},],},{name: ["age",],description: "Interact with age",subcommands: [{name: ["decrypt",],description: "Decrypt file or standard input",options: [{name: ["--passphrase","-p",],description: "Decrypt with a passphrase",},],},{name: ["encrypt",],description: "Encrypt file or standard input",options: [{name: ["--passphrase","-p",],description: "Encrypt with a passphrase",},],},],},{name: ["apply",],description: "Update the destination directory to match the target state",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["archive",],description: "Generate a tar archive of the target state",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--format","-f",],description: "Set archive format",args: [{name: "format",},],},{name: ["--gzip","-z",],description: "Compress output with gzip",},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "none",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["cat",],description: "Print the target contents of a file, script, or symlink",},{name: ["cat-config",],description: "Print the configuration file",},{name: ["cd",],description: "Launch a shell in the source directory",},{name: ["chattr",],description: "Change the attributes of a target in the source state",options: [{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["completion",],description: "Generate shell completion code",},{name: ["data",],description: "Print the template data",options: [{name: ["--format","-f",],description: "Output format",isPersistent: true,args: [{name: "format",default: "json",},],},],},{name: ["decrypt",],description: "Decrypt file or standard input",},{name: ["diff",],description: "Print the diff between the target state and the destination state",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--pager",],description: "Set pager",args: [{name: "pager",default: "",},],},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},{name: ["--reverse",],description: "Reverse the direction of the diff",},{name: ["--script-contents",],description: "Show script contents",},{name: ["--use-builtin-diff",],description: "Use the builtin diff",},],},{name: ["doctor",],description: "Check your system for potential problems",},{name: ["dump",],description: "Generate a dump of the target state",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--format","-f",],description: "Output format",args: [{name: "format",default: "json",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["dump-config",],description: "Dump the configuration values",options: [{name: ["--format","-f",],description: "Output format",args: [{name: "format",default: "json",},],},],},{name: ["edit",],description: "Edit the source state of a target",options: [{name: ["--apply","-a",],description: "Apply after editing",},{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--hardlink",],description: "Invoke editor with a hardlink to the source file",},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--watch",],description: "Apply on save",},],},{name: ["edit-config",],description: "Edit the configuration file",},{name: ["edit-config-template",],description: "Edit the configuration file template",},{name: ["encrypt",],description: "Encrypt file or standard input",},{name: ["execute-template",],description: "Execute the given template(s)",options: [{name: ["--init","-i",],description: "Simulate chezmoi init",},{name: ["--left-delimiter",],description: "Set left template delimiter",args: [{name: "left-delimiter",},],},{name: ["--promptBool",],description: "Simulate promptBool",args: [{name: "promptBool",},],},{name: ["--promptChoice",],description: "Simulate promptChoice",args: [{name: "promptChoice",},],},{name: ["--promptInt",],description: "Simulate promptInt",args: [{name: "promptInt",},],},{name: ["--promptString","-p",],description: "Simulate promptString",args: [{name: "promptString",},],},{name: ["--right-delimiter",],description: "Set right template delimiter",args: [{name: "right-delimiter",},],},{name: ["--stdinisatty",],description: "Simulate stdinIsATTY",},{name: ["--with-stdin",],description: "Set .chezmoi.stdin to the contents of the standard input",},],},{name: ["unmanage","forget",],description: "Remove a target from the source state",},{name: ["generate",],description: "Generate a file for use with chezmoi",},{name: ["git",],description: "Run git in the source directory",},{name: ["ignored",],description: "Print ignored targets",},{name: ["import",],description: "Import an archive into the source state",options: [{name: ["--destination","-d",],description: "Set destination prefix",args: [{name: "destination",default: "$WORK/home/user",},],},{name: ["--exact",],description: "Set exact_ attribute on imported directories",},{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--remove-destination","-r",],description: "Remove destination before import",},{name: ["--strip-components",],description: "Strip leading path components",args: [{name: "strip-components",default: "0",},],},],},{name: ["init",],description: "Setup the source directory and update the destination directory to match the target state",options: [{name: ["--apply","-a",],description: "Update destination directory",},{name: ["--branch",],description: "Set initial branch to checkout",args: [{name: "branch",},],},{name: ["--config-path","-C",],description: "Path to write generated config file",args: [{name: "config-path",},],},{name: ["--data",],description: "Include existing template data",},{name: ["--depth","-d",],description: "Create a shallow clone",args: [{name: "depth",default: "0",},],},{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--guess-repo-url","-g",],description: "Guess the repo URL",},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--one-shot",],description: "Run in one-shot mode",},{name: ["--prompt",],description: "Force prompt*Once template functions to prompt",},{name: ["--promptBool",],description: "Populate promptBool",args: [{name: "promptBool",},],},{name: ["--promptChoice",],description: "Populate promptChoice",args: [{name: "promptChoice",},],},{name: ["--promptDefaults",],description: "Make prompt functions return default values",},{name: ["--promptInt",],description: "Populate promptInt",args: [{name: "promptInt",},],},{name: ["--promptString",],description: "Populate promptString",args: [{name: "promptString",},],},{name: ["--purge","-p",],description: "Purge config and source directories after running",},{name: ["--purge-binary","-P",],description: "Purge chezmoi binary after running",},{name: ["--recurse-submodules",],description: "Checkout submodules recursively",},{name: ["--ssh",],description: "Use ssh instead of https when guessing repo URL",},],},{name: ["license",],description: "Print license",},{name: ["list","managed",],description: "List the managed entries in the destination directory",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--path-style","-p",],description: "Path style",args: [{name: "path-style",default: "relative",},],},],},{name: ["merge",],description: "Perform a three-way merge between the destination state, the source state, and the target state",},{name: ["merge-all",],description: "Perform a three-way merge for each modified file",options: [{name: ["--init",],description: "Recreate config file from template",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["purge",],description: "Purge chezmoi\'s configuration and data",options: [{name: ["--binary","-P",],description: "Purge chezmoi binary",},],},{name: ["re-add",],description: "Re-add modified files",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["rm","remove",],description: "Remove a target from the source state and the destination directory",options: [{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["secret",],description: "Interact with a secret manager",subcommands: [{name: ["keyring",],description: "Interact with keyring",subcommands: [{name: ["delete",],description: "Delete a value from keyring",options: [{name: ["--service",],description: "service",isPersistent: true,args: [{name: "service",},],isRequired: true,},{name: ["--user",],description: "user",isPersistent: true,args: [{name: "user",},],isRequired: true,},],},{name: ["get",],description: "Get a value from keyring",options: [{name: ["--service",],description: "service",isPersistent: true,args: [{name: "service",},],isRequired: true,},{name: ["--user",],description: "user",isPersistent: true,args: [{name: "user",},],isRequired: true,},],},{name: ["set",],description: "Set a value in keyring",options: [{name: ["--service",],description: "service",isPersistent: true,args: [{name: "service",},],isRequired: true,},{name: ["--user",],description: "user",isPersistent: true,args: [{name: "user",},],isRequired: true,},{name: ["--value",],description: "value",isPersistent: true,args: [{name: "value",},],},],},],},],},{name: ["source-path",],description: "Print the source path of a target",},{name: ["state",],description: "Manipulate the persistent state",subcommands: [{name: ["data",],description: "Print the raw data in the persistent state",options: [{name: ["--format","-f",],description: "Output format",isPersistent: true,args: [{name: "format",default: "json",},],},],},{name: ["delete",],description: "Delete a value from the persistent state",options: [{name: ["--bucket",],description: "Bucket",isPersistent: true,args: [{name: "bucket",},],},{name: ["--key",],description: "Key",isPersistent: true,args: [{name: "key",},],},],},{name: ["delete-bucket",],description: "Delete a bucket from the persistent state",options: [{name: ["--bucket",],description: "Bucket",isPersistent: true,args: [{name: "bucket",},],},],},{name: ["dump",],description: "Generate a dump of the persistent state",options: [{name: ["--format","-f",],description: "Output format",isPersistent: true,args: [{name: "format",default: "json",},],},],},{name: ["get",],description: "Get a value from the persistent state",options: [{name: ["--bucket",],description: "Bucket",isPersistent: true,args: [{name: "bucket",},],},{name: ["--key",],description: "Key",isPersistent: true,args: [{name: "key",},],},],},{name: ["get-bucket",],description: "Get a bucket from the persistent state",options: [{name: ["--bucket",],description: "bucket",isPersistent: true,args: [{name: "bucket",},],},{name: ["--format","-f",],description: "Output format",isPersistent: true,args: [{name: "format",default: "json",},],},],},{name: ["reset",],description: "Reset the persistent state",},{name: ["set",],description: "Set a value from the persistent state",options: [{name: ["--bucket",],description: "Bucket",isPersistent: true,args: [{name: "bucket",},],},{name: ["--key",],description: "Key",isPersistent: true,args: [{name: "key",},],},{name: ["--value",],description: "Value",isPersistent: true,args: [{name: "value",},],},],},],},{name: ["status",],description: "Show the status of targets",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--path-style","-p",],description: "Path style",args: [{name: "path-style",default: "relative",},],},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["target-path",],description: "Print the target path of a source path",},{name: ["unmanaged",],description: "List the unmanaged files in the destination directory",options: [{name: ["--path-style","-p",],description: "Path style",args: [{name: "path-style",default: "relative",},],},],},{name: ["update",],description: "Pull and apply any changes",options: [{name: ["--apply","-a",],description: "Apply after pulling",},{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--recurse-submodules",],description: "Recursively update submodules",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["upgrade",],description: "Upgrade chezmoi to the latest released version",options: [{name: ["--executable",],description: "Set executable to replace",args: [{name: "executable",},],},{name: ["--method",],description: "Set upgrade method",args: [{name: "method",},],},{name: ["--owner",],description: "Set owner",args: [{name: "owner",default: "twpayne",},],},{name: ["--repo",],description: "Set repo",args: [{name: "repo",default: "chezmoi",},],},],},{name: ["verify",],description: "Exit with success if the destination state matches the target state, fail otherwise",options: [{name: ["--exclude","-x",],description: "Exclude entry types",args: [{name: "exclude",default: "none",},],},{name: ["--include","-i",],description: "Include entry types",args: [{name: "include",default: "all",},],},{name: ["--init",],description: "Recreate config file from template",},{name: ["--recursive","-r",],description: "Recurse into subdirectories",},],},{name: ["help",],description: "Help about any command",subcommands: [{name: ["manage","add",],description: "Add an existing file, directory, or symlink to the source state",},{name: ["age",],description: "Interact with age",subcommands: [{name: ["decrypt",],description: "Decrypt file or standard input",},{name: ["encrypt",],description: "Encrypt file or standard input",},],},{name: ["apply",],description: "Update the destination directory to match the target state",},{name: ["archive",],description: "Generate a tar archive of the target state",},{name: ["cat",],description: "Print the target contents of a file, script, or symlink",},{name: ["cat-config",],description: "Print the configuration file",},{name: ["cd",],description: "Launch a shell in the source directory",},{name: ["chattr",],description: "Change the attributes of a target in the source state",},{name: ["completion",],description: "Generate shell completion code",},{name: ["data",],description: "Print the template data",},{name: ["decrypt",],description: "Decrypt file or standard input",},{name: ["diff",],description: "Print the diff between the target state and the destination state",},{name: ["doctor",],description: "Check your system for potential problems",},{name: ["dump",],description: "Generate a dump of the target state",},{name: ["dump-config",],description: "Dump the configuration values",},{name: ["edit",],description: "Edit the source state of a target",},{name: ["edit-config",],description: "Edit the configuration file",},{name: ["edit-config-template",],description: "Edit the configuration file template",},{name: ["encrypt",],description: "Encrypt file or standard input",},{name: ["execute-template",],description: "Execute the given template(s)",},{name: ["unmanage","forget",],description: "Remove a target from the source state",},{name: ["generate",],description: "Generate a file for use with chezmoi",},{name: ["git",],description: "Run git in the source directory",},{name: ["ignored",],description: "Print ignored targets",},{name: ["import",],description: "Import an archive into the source state",},{name: ["init",],description: "Setup the source directory and update the destination directory to match the target state",},{name: ["license",],description: "Print license",},{name: ["list","managed",],description: "List the managed entries in the destination directory",},{name: ["merge",],description: "Perform a three-way merge between the destination state, the source state, and the target state",},{name: ["merge-all",],description: "Perform a three-way merge for each modified file",},{name: ["purge",],description: "Purge chezmoi\'s configuration and data",},{name: ["re-add",],description: "Re-add modified files",},{name: ["rm","remove",],description: "Remove a target from the source state and the destination directory",},{name: ["secret",],description: "Interact with a secret manager",subcommands: [{name: ["keyring",],description: "Interact with keyring",subcommands: [{name: ["delete",],description: "Delete a value from keyring",},{name: ["get",],description: "Get a value from keyring",},{name: ["set",],description: "Set a value in keyring",},],},],},{name: ["source-path",],description: "Print the source path of a target",},{name: ["state",],description: "Manipulate the persistent state",subcommands: [{name: ["data",],description: "Print the raw data in the persistent state",},{name: ["delete",],description: "Delete a value from the persistent state",},{name: ["delete-bucket",],description: "Delete a bucket from the persistent state",},{name: ["dump",],description: "Generate a dump of the persistent state",},{name: ["get",],description: "Get a value from the persistent state",},{name: ["get-bucket",],description: "Get a bucket from the persistent state",},{name: ["reset",],description: "Reset the persistent state",},{name: ["set",],description: "Set a value from the persistent state",},],},{name: ["status",],description: "Show the status of targets",},{name: ["target-path",],description: "Print the target path of a source path",},{name: ["unmanaged",],description: "List the unmanaged files in the destination directory",},{name: ["update",],description: "Pull and apply any changes",},{name: ["upgrade",],description: "Upgrade chezmoi to the latest released version",},{name: ["verify",],description: "Exit with success if the destination state matches the target state, fail otherwise",},],},],options: [{name: ["--cache",],description: "Set cache directory",isPersistent: true,args: [{name: "cache",default: "$WORK/home/user/.cache/chezmoi",},],},{name: ["--color",],description: "Colorize output",isPersistent: true,args: [{name: "color",default: "auto",},],},{name: ["--config","-c",],description: "Set config file",isPersistent: true,args: [{name: "config",template: ["filepaths",],},],},{name: ["--config-format",],description: "Set config file format",isPersistent: true,args: [{name: "config-format",},],},{name: ["--cpu-profile",],description: "Write a CPU profile to path",isPersistent: true,hidden: true,args: [{name: "cpu-profile",template: ["filepaths",],},],},{name: ["--debug",],description: "Include debug information in output",isPersistent: true,},{name: ["--destination","-D",],description: "Set destination directory",isPersistent: true,args: [{name: "destination",default: "$WORK/home/user",template: ["folders",],},],},{name: ["--dry-run","-n",],description: "Do not make any modifications to the destination directory",isPersistent: true,},{name: ["--force",],description: "Make all changes without prompting",isPersistent: true,},{name: ["--interactive",],description: "Prompt for all changes",isPersistent: true,},{name: ["--keep-going","-k",],description: "Keep going as far as possible after an error",isPersistent: true,},{name: ["--mode",],description: "Mode",isPersistent: true,args: [{name: "mode",},],},{name: ["--no-pager",],description: "Do not use the pager",isPersistent: true,},{name: ["--no-tty",],description: "Do not attempt to get a TTY for prompts",isPersistent: true,},{name: ["--output","-o",],description: "Write output to path instead of stdout",isPersistent: true,args: [{name: "output",template: ["filepaths",],},],},{name: ["--persistent-state",],description: "Set persistent state file",isPersistent: true,args: [{name: "persistent-state",},],},{name: ["--progress",],description: "Display progress bars",isPersistent: true,args: [{name: "progress",default: "auto",},],},{name: ["--refresh-externals","-R",],description: "Refresh external cache",isPersistent: true,args: [{name: "refresh-externals",default: "auto",},],},{name: ["--safe",],description: "Safely replace files and symlinks",isPersistent: true,hidden: true,},{name: ["--source","-S",],description: "Set source directory",isPersistent: true,args: [{name: "source",default: "$WORK/home/user/.local/share/chezmoi",template: ["folders",],},],},{name: ["--source-path",],description: "Specify targets by source path",isPersistent: true,},{name: ["--use-builtin-age",],description: "Use builtin age",isPersistent: true,args: [{name: "use-builtin-age",default: "auto",},],},{name: ["--use-builtin-git",],description: "Use builtin git",isPersistent: true,args: [{name: "use-builtin-git",default: "auto",},],},{name: ["--verbose","-v",],description: "Make output more verbose",isPersistent: true,},{name: ["--working-tree","-W",],description: "Set working tree directory",isPersistent: true,args: [{name: "working-tree",},],},{name: ["--help","-h",],description: "Display help",isPersistent: true,},],}; export default completionSpec; > stdout 'const completionSpec:' PASS === CONT TestScript/issue796 === NAME TestScript/script_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/mackuppipx_darwin cmd.go:381: Darwin only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!darwin] skip 'Darwin only' === CONT TestScript/config === NAME TestScript/modifypython_windows cmd.go:381: Windows only === NAME TestScript/mackuppip_darwin cmd.go:381: Darwin only === NAME TestScript/issue3349 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > symlink $CHEZMOISOURCEDIR/home/dot_symlink_to_file -> dot_file > symlink $CHEZMOISOURCEDIR/home/dot_symlink_to_dir -> dot_dir # test that chezmoi apply follows symlinks to files but not symlinks to directories (2.224s) > exec chezmoi apply > cmp $HOME/.file golden/.file > cmp $HOME/.symlink_to_file golden/.file > cmp $HOME/.dir/file golden/.dir/file > isdir $HOME/.symlink_to_dir > ! exists $HOME/.symlink_to_dir/file PASS === CONT TestScript/create === NAME TestScript/plugin testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/chezmoi-plugin # test that chezmoi returns unknown command errors for unknown commands (1.738s) > ! exec chezmoi unknown [stderr] chezmoi: unknown command "unknown" for "chezmoi" [exit status 1] > stderr 'unknown command' # test that chezmoi executes plugins (0.799s) > exec chezmoi plugin [stdout] hello > stdout hello PASS === CONT TestScript/issue3005 === NAME TestScript/mackuppip_darwin testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!darwin] skip 'Darwin only' === NAME TestScript/modifypython_windows testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/scriptinterpreters_windows cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === CONT TestScript/issue3510 === CONT TestScript/issue3232 === CONT TestScript/issue3421 === CONT TestScript/issue3206 === CONT TestScript/issue3163 === CONT TestScript/issue3418 === CONT TestScript/verify gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir1669783135/pubring.kbx' created === CONT TestScript/issue3127 gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir1922752283/pubring.kbx' created gpg: /tmp/test-gpg-homedir309041386/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir309041386/openpgp-revocs.d' created === NAME TestScript/sourcedir testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > exec chezmoi execute-template '{{ .chezmoi.sourceDir }}' [stdout] /tmp/user> stdout '/tmp/user' PASS === NAME TestScript/issue3374 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi copes with extra slashes in path arguments (1.066s) > exec chezmoi cat $HOME//.file [stdout] # contents of .file > cmp stdout golden/.file PASS === CONT TestScript/issue2137 gpg: /tmp/test-gpg-homedir1860641310/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir1860641310/openpgp-revocs.d' created === CONT TestScript/completion_unix gpg: revocation certificate stored as '/tmp/test-gpg-homedir309041386/openpgp-revocs.d/93FE4CA7E23491C6C15930F116170F3814E80FEB.rev' === NAME TestScript/passhole testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/ph > [windows] unix2dos bin/ph.cmd # test passhole template function (0.907s) > stdin golden/stdin > exec chezmoi execute-template --no-tty '{{ passhole "example.com" "password" }}' [stdout] Enter database password: examplepassword > stdout examplepassword PASS === CONT TestScript/issue3126 gpg: revocation certificate stored as '/tmp/test-gpg-homedir1860641310/openpgp-revocs.d/79ED873CFA4DE8215642506393507C98BD0A245F.rev' === NAME TestScript/externaldir testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > symlink $CHEZMOISOURCEDIR/dot_vim/external_bundle/symlink -> executable_file # test that chezmoi ignores attributes in external_ dirs (1.242s) > exec chezmoi apply # test that executable_ attributes are ignored and empty files are created (0.001s) > cmp $HOME/.vim/bundle/executable_file $CHEZMOISOURCEDIR/dot_vim/external_bundle/executable_file # test that scripts are not run (0.001s) > cmp $HOME/.vim/bundle/run_script.sh $CHEZMOISOURCEDIR/dot_vim/external_bundle/run_script.sh > ! stdout evil # test that private_ attributes are ignored and subdirectories are created (0.002s) > isdir $HOME/.vim/bundle/private_subdir # test that files can be ignored (0.000s) > ! exists $HOME/.vim/bundle/private_subdir/.keep # test that symlinks are created (0.000s) > issymlink $HOME/.vim/bundle/symlink # test that symlink_ attributes are ignored (0.028s) > cmp $HOME/.vim/bundle/symlink_example $CHEZMOISOURCEDIR/dot_vim/external_bundle/symlink_example > ! issymlink $HOME/.vim/bundle/symlink_example PASS === NAME TestScript/scripttempdir testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi apply with a scriptTempDir set creates a temporary directory (2.976s) > expandenv $CHEZMOICONFIGDIR/chezmoi.toml > exec chezmoi apply [stdout] ok > stdout ok > exists $WORK/script-tmp PASS === CONT TestScript/issue2820 === CONT TestScript/issue3113 === NAME TestScript/license testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi license prints chezmoi's license (3.085s) > exec chezmoi license [stdout] The MIT License (MIT) Copyright (c) 2018-2024 Tom Payne Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. > stdout 'The MIT License' PASS === NAME TestScript/version testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > exec chezmoi --version [stdout] chezmoi version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:32Z, built by testscript > stdout 'chezmoi version v2\.0\.0' PASS === CONT TestScript/issue2752 === CONT TestScript/dumpjson === NAME TestScript/applyverbose testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply --dry-run --verbose does not show scripts when scripts are excluded from diffs (1.767s) > exec chezmoi apply --dry-run --verbose [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file > [unix] [umask:002] cmp stdout golden/apply-umask-002.diff > [unix] [umask:022] cmp stdout golden/apply-umask-022.diff > [windows] cmp stdout golden/apply-windows.diff > chhome home2/user # test that chezmoi apply --dry-run --force --verbose does not show removes when removes are excluded from diffs (1.541s) > exec chezmoi apply --dry-run --force --verbose > ! stdout . PASS === NAME TestScript/addattributes testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir # test that chezmoi add warns if adding a file would remove the template attribute (1.422s) > stdin golden/yes > exec chezmoi add --no-tty $HOME${/}.file [stdout] adding .file would remove template attribute, continue (yes/no/all/quit)? > stdout 'adding \.file would remove template attribute, continue' > cmp $CHEZMOISOURCEDIR/dot_file golden/.file > ! exists $CHEZMOISOURCEDIR/dot_file.tmpl PASS === NAME TestScript/issue3005 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi --debug init does not fail (0.790s) > exec chezmoi --debug init [stderr] time=2024-02-12T22:22:32.285+08:00 level=INFO msg=persistentPreRunRootE version.version=v2.0.0+test version.commit=HEAD version.date=2024-02-12T14:22:32Z version.builtBy=testscript args="[chezmoi --debug init]" goVersion=go1.22.0 time=2024-02-12T22:22:32.287+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.config/chezmoi/chezmoistate.boltdb: no such file or directory" name=$WORK/home/user/.config/chezmoi/chezmoistate.boltdb time=2024-02-12T22:22:32.288+08:00 level=ERROR msg=Mkdir component=system err="mkdir $WORK/home/user/.local/share/chezmoi: no such file or directory" name=$WORK/home/user/.local/share/chezmoi perm=511 time=2024-02-12T22:22:32.288+08:00 level=ERROR msg=Mkdir component=system err="mkdir $WORK/home/user/.local/share: no such file or directory" name=$WORK/home/user/.local/share perm=511 time=2024-02-12T22:22:32.288+08:00 level=ERROR msg=Mkdir component=system err="mkdir $WORK/home/user/.local: no such file or directory" name=$WORK/home/user/.local perm=511 time=2024-02-12T22:22:32.288+08:00 level=ERROR msg=Mkdir component=system err="mkdir $WORK/home/user: no such file or directory" name=$WORK/home/user perm=511 time=2024-02-12T22:22:32.289+08:00 level=INFO msg=Mkdir component=system name=$WORK/home perm=511 time=2024-02-12T22:22:32.289+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user perm=511 time=2024-02-12T22:22:32.289+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.local perm=511 time=2024-02-12T22:22:32.289+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.local/share perm=511 time=2024-02-12T22:22:32.292+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.local/share/chezmoi perm=511 time=2024-02-12T22:22:32.293+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/share/chezmoi/.git: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.git time=2024-02-12T22:22:32.294+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/share/.git: no such file or directory" name=$WORK/home/user/.local/share/.git time=2024-02-12T22:22:32.295+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/.git: no such file or directory" name=$WORK/home/user/.local/.git time=2024-02-12T22:22:32.295+08:00 level=ERROR msg=Mkdir component=system err="mkdir $WORK/home/user/.local/share/chezmoi: file exists" name=$WORK/home/user/.local/share/chezmoi perm=511 time=2024-02-12T22:22:32.295+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:32.311+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiroot: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiroot size=0 data="" time=2024-02-12T22:22:32.315+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/share/chezmoi/.git: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.git time=2024-02-12T22:22:32.363+08:00 level=INFO msg=Run cmd="/usr/bin/git init --quiet" duration=46.439387ms err= time=2024-02-12T22:22:32.364+08:00 level=INFO msg=RunCmd component=system cmd="/usr/bin/git init --quiet" duration=47.438805ms err= time=2024-02-12T22:22:32.365+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiversion: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiversion size=0 data="" time=2024-02-12T22:22:32.365+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiroot: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiroot size=0 data="" time=2024-02-12T22:22:32.366+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:32.367+08:00 level=INFO msg=Delete component=persistentState bucket=configState key=configState time=2024-02-12T22:22:32.367+08:00 level=INFO msg=Close component=persistentState PASS === NAME TestScript/externalzip testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'zip may not support the --symlinks option' > [!exec:zip] skip 'zip not found in $PATH' > symlink archive/dir/symlink -> file > exec zip -r --symlinks www/archive.zip archive [stdout] adding: archive/ (stored 0%) adding: archive/dir/ (stored 0%) adding: archive/dir/symlink (stored 0%) adding: archive/dir/file (stored 0%) > httpd www # test that chezmoi reads external zip archives from .chezmoiexternal.json (0.759s) > exec chezmoi apply --force > cmp $HOME/.dir/dir/file golden/dir/file > issymlink $HOME/.dir/dir/symlink PASS === CONT TestScript/issue2695 === CONT TestScript/builtinage cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' === CONT TestScript/edgecasesumask === NAME TestScript/pass testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/pass > [windows] unix2dos bin/pass.cmd > [windows] unix2dos golden/pass-raw # test pass template function (1.837s) > exec chezmoi execute-template '{{ pass "misc/example.com" }}' [stdout] examplepassword> stdout ^examplepassword$ # test passFields template function (0.810s) > exec chezmoi execute-template '{{ (passFields "misc/example.com").login }}' [stdout] examplelogin> stdout ^examplelogin$ # test pass template function (0.769s) > exec chezmoi execute-template '{{ passRaw "misc/example.com" }}' [stdout] examplepassword login: examplelogin > cmp stdout golden/pass-raw PASS gpg: /tmp/test-gpg-homedir2434846373/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir2434846373/openpgp-revocs.d' created === CONT TestScript/issue2649 === CONT TestScript/vault === CONT TestScript/edgecases === NAME TestScript/dashlane testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/dcli > [windows] unix2dos bin/dcli.cmd > [windows] unix2dos golden/dashlane-note # test dashlanePassword template function (1.006s) > exec chezmoi execute-template '{{ (index (dashlanePassword "filter") 0).password }}' [stdout] > stdout ^$ # test dashlaneNote template function (0.723s) > exec chezmoi execute-template '{{ dashlaneNote "filter" }}' [stdout] > cmp stdout golden/dashlane-note PASS === CONT TestScript/issue3064 === NAME TestScript/issue3510 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > expandenv $CHEZMOISOURCEDIR/.chezmoiexternal.toml # test that chezmoi apply does not cache the absence of git in $PATH at startup (0.886s) > exec chezmoi apply [stdout] using newly-installed git > stdout 'using newly-installed git' PASS === CONT TestScript/dumpyaml gpg: revocation certificate stored as '/tmp/test-gpg-homedir2434846373/openpgp-revocs.d/0ED39FFB96B88F7F89A73F9E20A12E0E46354D47.rev' === NAME TestScript/issue2858 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi managed lists managed files in git-repo externals (0.923s) > exec chezmoi managed [stdout] .dir > cmp stdout golden/managed # test that chezmoi unmanaged does not list files in git-repo externals (0.857s) > exec chezmoi unmanaged [stdout] .local > cmp stdout golden/unmanaged PASS === CONT TestScript/issue3051 === NAME TestScript/archivetar testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir > [windows] unix2dos golden/archive-tar > exec chezmoi archive --output=archive.tar > exec tar -tf archive.tar [stdout] .create .dir/ .dir/file .dir/subdir/ .dir/subdir/file .empty .executable .file .private .readonly .symlink .template > [!openbsd] cmp stdout golden/archive-tar > [openbsd] cmp stdout golden/archive-tar-openbsd > exec chezmoi archive --gzip --output=archive.tar.gz > exec tar -tzf archive.tar.gz [stdout] .create .dir/ .dir/file .dir/subdir/ .dir/subdir/file .empty .executable .file .private .readonly .symlink .template > [!openbsd] cmp stdout golden/archive-tar > [openbsd] cmp stdout golden/archive-tar-openbsd PASS === CONT TestScript/issue2942 gpg: /tmp/test-gpg-homedir2242230989/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir2242230989/openpgp-revocs.d' created === NAME TestScript/externalfilter testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:base64] skip 'base64 not found in $PATH' > httpd www # test that chezmoi filters external files (1.029s) > exec chezmoi cat $HOME${/}.file [stdout] # contents of .file > cmp stdout golden/.file PASS === NAME TestScript/catconfig testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi cat-config prints the configuration file without parsing it (3.278s) > exec chezmoi cat-config [stdout] # contents of .config/chezmoi/chezmoi.json > cmp stdout golden/cat-config PASS === CONT TestScript/doppler === CONT TestScript/issue3008 === NAME TestScript/lastpass testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/lpass > [windows] unix2dos bin/lpass.cmd # test lastpass template function (1.100s) > exec chezmoi execute-template '{{ (index (lastpass "example.com") 0).password }}' [stdout] examplepassword> stdout ^examplepassword$ PASS === CONT TestScript/issue2628 === NAME TestScript/runscriptdir_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!umask:022] skip > exec chezmoi apply [stdout] $WORK/home/user/dir > cmpenv stdout golden/apply > env $=$ > exec chezmoi dump [stdout] { "dir": { "type": "dir", "name": "dir", "perm": 493 }, "dir/script.sh": { "type": "script", "name": "dir/script.sh", "contents": "#!/bin/sh\n\npwd\n", "condition": "always" } } > cmp stdout golden/dump.json > exec chezmoi archive --output=archive.tar > exec tar -tf archive.tar [stdout] dir/ dir/script.sh > [openbsd] cmp stdout golden/archive-openbsd > [!openbsd] cmp stdout golden/archive PASS === CONT TestScript/dumpconfig gpg: revocation certificate stored as '/tmp/test-gpg-homedir2242230989/openpgp-revocs.d/006BD54E925061A972759F6AEE8B1E7A3BA35F83.rev' === NAME TestScript/issue3163 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi supports separate files via templates (1.098s) > exec chezmoi apply > cmp $HOME/.file1 golden/file1 > cmp $HOME/.file2 golden/file2 PASS === CONT TestScript/doctor_windows gpg: /tmp/test-gpg-homedir1669783135/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir1669783135/openpgp-revocs.d' created cmd.go:381: Windows only testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] skip 'Windows only' === NAME TestScript/create cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply creates a file from a template (1.161s) > mkdir $CHEZMOISOURCEDIR > cp golden/create_dot_create.tmpl $CHEZMOISOURCEDIR > exec chezmoi apply --force > cmp $HOME/.create golden/.create > [windows] skip 'UNIX only' > [!exec:age] skip 'age not found in $PATH' === CONT TestScript/issue2609 === CONT TestScript/issue2599 === NAME TestScript/rbw testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/rbw > [windows] unix2dos bin/rbw.cmd # test rbw template function (0.272s) > exec chezmoi execute-template '{{ (rbw "test-entry").data.password }}' [stdout] hunter2> stdout ^hunter2$ # test rbw template function with extra args (1.347s) > exec chezmoi execute-template '{{ (rbw "test-entry" "--folder" "my-folder").data.password }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ # test rbwFields template function (1.220s) > exec chezmoi execute-template '{{ (rbwFields "test-entry").something.value }}' [stdout] secret> stdout ^secret$ # test rbwFields template function with extra args (0.965s) > exec chezmoi execute-template '{{ (rbwFields "test-entry" "--folder" "my-folder").something.value }}' [stdout] enigma> stdout ^enigma$ PASS === CONT TestScript/issue1237 gpg: /tmp/test-gpg-homedir1922752283/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir1922752283/openpgp-revocs.d' created === NAME TestScript/edithardlink testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'Windows does not support hardlinks' # test that chezmoi edit uses a hardlink by default (0.908s) > exec chezmoi edit $HOME${/}.file [stdout] $WORK/.tmp/chezmoi-edit20017855/.file [stderr] chezmoi: warning: echo $WORK/.tmp/chezmoi-edit20017855/.file: returned in less than 1s > stdout /\.file$ # test that chezmoi edit --hardlink=false does not use a hardlink (1.230s) > exec chezmoi edit --hardlink=false $HOME${/}.file [stdout] $WORK/home/user/.local/share/chezmoi/dot_file [stderr] chezmoi: warning: echo $WORK/home/user/.local/share/chezmoi/dot_file: returned in less than 1s > stdout ${CHEZMOISOURCEDIR@R}/dot_file$ PASS === CONT TestScript/doctor_unix === NAME TestScript/tilde testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir > exec chezmoi source-path ~/.file [stdout] $WORK/home/user/.local/share/chezmoi/dot_file > stdout $CHEZMOISOURCEDIR/dot_file > ! exec chezmoi source-path ~ [stderr] chezmoi: ~: not managed [exit status 1] > stderr 'not managed' PASS === NAME TestScript/applyremove testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply --dry-run does not remove entries (1.516s) > exec chezmoi apply --dry-run --force > exists $HOME/.dir/file > exists $HOME/.file1 > exists $HOME/.file2 # test that chezmoi apply file1 removes only file1 (1.511s) > exec chezmoi apply --force $HOME${/}.file1 > exists $HOME/.dir/file > ! exists $HOME/.file1 > exists $HOME/.file2 # test that chezmoi apply removes all entries (0.823s) > exec chezmoi apply --force > ! exists $HOME/.dir/file > ! exists $HOME/.file1 > ! exists $HOME/.file2 PASS === CONT TestScript/issue2577 === NAME TestScript/issue2752 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'uses forward slashes in paths' # test that chezmoi target-path does not include .chezmoiroot in the output (0.717s) > exec chezmoi target-path $CHEZMOISOURCEDIR${/}home${/}dot_file [stdout] $WORK/home/user/.file > stdout ${HOME@R}/\.file PASS === CONT TestScript/issue2995 === CONT TestScript/issue2354 === NAME TestScript/literal testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi add can add files that look like files in the source state (1.735s) > exec chezmoi add $HOME${/}dot_file $HOME${/}run_script $HOME${/}symlink_symlink $HOME${/}template.tmpl > rm $HOME/dot_file $HOME/run_script $HOME/symlink_symlink $HOME/template.tmpl > exec chezmoi apply --force > ! exists $HOME/.file > ! stdout . > ! exists $HOME/symlink > ! exists $HOME/template > cmp $HOME/dot_file golden/dot_file > cmp $HOME/run_script golden/run_script > cmp $HOME/symlink_symlink golden/symlink_symlink > cmp $HOME/template.tmpl golden/template.tmpl PASS === CONT TestScript/issue2315 === NAME TestScript/applyexact testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply --dry-run does not remove entries from exact directories (0.663s) > exec chezmoi apply --dry-run --force > exists $HOME/.dir/file1 > exists $HOME/.dir/file2 > exists $HOME/.dir/subdir/file # test that chezmoi apply removes entries from exact directories (0.692s) > exec chezmoi apply --force > exists $HOME/.dir/file1 > ! exists $HOME/.dir/file2 > ! exists $HOME/.dir/subdir/file PASS gpg: revocation certificate stored as '/tmp/test-gpg-homedir1922752283/openpgp-revocs.d/63897BB99657EBA5C0C5333FA310B64EA87EF7B4.rev' === CONT TestScript/issue2300 gpg: revocation certificate stored as '/tmp/test-gpg-homedir1669783135/openpgp-revocs.d/17DA835628A378CDCEDB197B4B790EA011485691.rev' === NAME TestScript/noencryption testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir # test that chezmoi add --encrypt without encryption fails (0.746s) > ! exec chezmoi add --encrypt $HOME${/}.encrypted [stderr] chezmoi: no encryption [exit status 1] > stderr 'no encryption' # test that chezmoi apply without encryption fails (0.655s) > ! exec chezmoi apply --force [stderr] chezmoi: no encryption [exit status 1] > stderr 'no encryption' PASS === NAME TestScript/script testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/perl > [unix] chmod 755 bin/python3 > [unix] chmod 755 bin/ruby > [windows] unix2dos golden/stdout # test that chezmoi apply uses python3 and ruby from $PATH instead of the system Python and Ruby (1.403s) > exec chezmoi apply [stdout] Hello from fake Perl Hello from fake Python Hello from fake Ruby > cmp stdout golden/stdout PASS === NAME TestScript/hooks testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] unix2dos golden/stdout # test that chezmoi add runs pre and post hooks (1.051s) > exec chezmoi add $HOME${/}.file [stdout] pre-add-hook pre-read-source-state-hook post-read-source-state-hook post-add-hook > cmp stdout golden/stdout # test that chezmoi does not run irrelevant hooks (0.972s) > exec chezmoi help [stdout] Manage your dotfiles across multiple diverse machines, securely Usage: chezmoi [command] Available Commands: add Add an existing file, directory, or symlink to the source state age Interact with age apply Update the destination directory to match the target state archive Generate a tar archive of the target state cat Print the target contents of a file, script, or symlink cat-config Print the configuration file cd Launch a shell in the source directory chattr Change the attributes of a target in the source state completion Generate shell completion code data Print the template data decrypt Decrypt file or standard input diff Print the diff between the target state and the destination state doctor Check your system for potential problems dump Generate a dump of the target state dump-config Dump the configuration values edit Edit the source state of a target edit-config Edit the configuration file edit-config-template Edit the configuration file template encrypt Encrypt file or standard input execute-template Execute the given template(s) forget Remove a target from the source state generate Generate a file for use with chezmoi git Run git in the source directory help Print help about a command ignored Print ignored targets import Import an archive into the source state init Setup the source directory and update the destination directory to match the target state license Print license managed List the managed entries in the destination directory merge Perform a three-way merge between the destination state, the source state, and the target state merge-all Perform a three-way merge for each modified file purge Purge chezmoi's configuration and data re-add Re-add modified files remove Remove a target from the source state and the destination directory secret Interact with a secret manager source-path Print the source path of a target state Manipulate the persistent state status Show the status of targets target-path Print the target path of a source path unmanaged List the unmanaged files in the destination directory update Pull and apply any changes upgrade Upgrade chezmoi to the latest released version verify Exit with success if the destination state matches the target state, fail otherwise Flags: --cache path Set cache directory (default $WORK/home/user/.cache/chezmoi) --color bool|auto Colorize output (default auto) -c, --config path Set config file --config-format json|toml|yaml Set config file format --debug Include debug information in output -D, --destination path Set destination directory (default $WORK/home/user) -n, --dry-run Do not make any modifications to the destination directory --force Make all changes without prompting --interactive Prompt for all changes -k, --keep-going Keep going as far as possible after an error --mode mode Mode --no-pager Do not use the pager --no-tty Do not attempt to get a TTY for prompts -o, --output path Write output to path instead of stdout --persistent-state path Set persistent state file --progress bool|auto Display progress bars (default auto) -R, --refresh-externals always|auto|never[=always] Refresh external cache (default auto) -S, --source path Set source directory (default $WORK/home/user/.local/share/chezmoi) --source-path Specify targets by source path --use-builtin-age bool|auto Use builtin age (default auto) --use-builtin-git bool|auto Use builtin git (default auto) -v, --verbose Make output more verbose -W, --working-tree path Set working tree directory (default ) Use "chezmoi [command] --help" for more information about a command. > ! stdout add-hook > ! stdout source-state-hook PASS === CONT TestScript/issue2977 === CONT TestScript/issue2302 === NAME TestScript/issue3126 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that template executions are independent (1.070s) > exec chezmoi apply > ! grep bar $HOME/file1 > ! grep foo $HOME/file2 PASS === CONT TestScript/issue2573 === CONT TestScript/issue2283 === NAME TestScript/gopass testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/gopass > [windows] unix2dos bin/gopass.cmd > [windows] unix2dos golden/gopass-raw # test gopass template function (1.061s) > exec chezmoi execute-template '{{ gopass "misc/example.com" }}' [stdout] examplepassword> stdout ^examplepassword$ # test gopass template function (1.403s) > exec chezmoi execute-template '{{ gopassRaw "misc/example.com" }}' [stdout] Secret: misc/example.com examplepassword key: value > cmp stdout golden/gopass-raw PASS === NAME TestScript/issue3064 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi respects the persistentState config variable (0.628s) > exec chezmoi apply > exists test.boltdb PASS === CONT TestScript/init === NAME TestScript/issue3206 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply sees .chezmoidata files in a subdirectory when a .chezmoiignore file is present (1.528s) > exec chezmoi apply --debug [stderr] time=2024-02-12T22:22:32.968+08:00 level=INFO msg=persistentPreRunRootE version.version=v2.0.0+test version.commit=HEAD version.date=2024-02-12T14:22:32Z version.builtBy=testscript args="[chezmoi apply --debug]" goVersion=go1.22.0 time=2024-02-12T22:22:32.972+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.config/chezmoi/chezmoistate.boltdb: no such file or directory" name=$WORK/home/user/.config/chezmoi/chezmoistate.boltdb time=2024-02-12T22:22:32.975+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:32.977+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/share/chezmoi/.git: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.git time=2024-02-12T22:22:32.978+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/share/.git: no such file or directory" name=$WORK/home/user/.local/share/.git time=2024-02-12T22:22:32.982+08:00 level=ERROR msg=Stat component=system err="stat $WORK/home/user/.local/.git: no such file or directory" name=$WORK/home/user/.local/.git time=2024-02-12T22:22:33.025+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiroot: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiroot size=0 data="" time=2024-02-12T22:22:33.030+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:33.030+08:00 level=INFO msg=Get component=persistentState bucket=configState key=configState value="" time=2024-02-12T22:22:33.031+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiversion: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiversion size=0 data="" time=2024-02-12T22:22:33.032+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:33.032+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:33.033+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:33.034+08:00 level=INFO msg=ReadFile component=system name=$WORK/home/user/.local/share/chezmoi/.chezmoiignore size=0 data="" time=2024-02-12T22:22:33.056+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_config time=2024-02-12T22:22:33.059+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_config/private_expanso time=2024-02-12T22:22:33.060+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_config/private_expanso/match time=2024-02-12T22:22:33.062+08:00 level=INFO msg=ReadFile component=system name=$WORK/home/user/.local/share/chezmoi/dot_config/private_expanso/match/.chezmoidata.yaml size=261 data="greek_alphabet: {alpha: α, beta: β, chi: χ, delta: δ, epsilo..." time=2024-02-12T22:22:33.065+08:00 level=ERROR msg=Lstat component=system err="lstat $WORK/home/user/.config: no such file or directory" name=$WORK/home/user/.config time=2024-02-12T22:22:33.066+08:00 level=INFO msg=Get component=persistentState bucket=entryState key=$WORK/home/user/.config value="" time=2024-02-12T22:22:33.066+08:00 level=INFO msg=defaultPreApplyFunc targetRelPath=.config targetEntryState.Type=dir targetEntryState.Mode=2147484141 targetEntryState.ContentsSHA256="" lastWrittenEntryState= actualEntryState.Type=remove actualEntryState.Mode=0 actualEntryState.ContentsSHA256="" time=2024-02-12T22:22:33.069+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.config perm=493 time=2024-02-12T22:22:33.072+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.config/chezmoi perm=511 time=2024-02-12T22:22:33.076+08:00 level=INFO msg=Set component=persistentState bucket=entryState key=$WORK/home/user/.config value="{\n \"type\": \"dir\",\n \"mode\": 2147484141\n}\n" time=2024-02-12T22:22:33.077+08:00 level=ERROR msg=Lstat component=system err="lstat $WORK/home/user/.config/expanso: no such file or directory" name=$WORK/home/user/.config/expanso time=2024-02-12T22:22:33.077+08:00 level=INFO msg=Get component=persistentState bucket=entryState key=$WORK/home/user/.config/expanso value="" time=2024-02-12T22:22:33.078+08:00 level=INFO msg=defaultPreApplyFunc targetRelPath=.config/expanso targetEntryState.Type=dir targetEntryState.Mode=2147484096 targetEntryState.ContentsSHA256="" lastWrittenEntryState= actualEntryState.Type=remove actualEntryState.Mode=0 actualEntryState.ContentsSHA256="" time=2024-02-12T22:22:33.078+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.config/expanso perm=448 time=2024-02-12T22:22:33.079+08:00 level=INFO msg=Set component=persistentState bucket=entryState key=$WORK/home/user/.config/expanso value="{\n \"type\": \"dir\",\n \"mode\": 2147484096\n}\n" time=2024-02-12T22:22:33.080+08:00 level=ERROR msg=Lstat component=system err="lstat $WORK/home/user/.config/expanso/match: no such file or directory" name=$WORK/home/user/.config/expanso/match time=2024-02-12T22:22:33.081+08:00 level=INFO msg=Get component=persistentState bucket=entryState key=$WORK/home/user/.config/expanso/match value="" time=2024-02-12T22:22:33.083+08:00 level=INFO msg=defaultPreApplyFunc targetRelPath=.config/expanso/match targetEntryState.Type=dir targetEntryState.Mode=2147484141 targetEntryState.ContentsSHA256="" lastWrittenEntryState= actualEntryState.Type=remove actualEntryState.Mode=0 actualEntryState.ContentsSHA256="" time=2024-02-12T22:22:33.085+08:00 level=INFO msg=Mkdir component=system name=$WORK/home/user/.config/expanso/match perm=493 time=2024-02-12T22:22:33.086+08:00 level=INFO msg=Set component=persistentState bucket=entryState key=$WORK/home/user/.config/expanso/match value="{\n \"type\": \"dir\",\n \"mode\": 2147484141\n}\n" time=2024-02-12T22:22:33.088+08:00 level=INFO msg=ReadFile component=system name=$WORK/home/user/.local/share/chezmoi/dot_config/private_expanso/match/greek.yml.tmpl size=255 data="# `propagate_case` allows e.g.:\n# alpha^ => α\n# ALPHA^ => Α [o..." time=2024-02-12T22:22:33.121+08:00 level=ERROR msg=Lstat component=system err="lstat $WORK/home/user/.config/expanso/match/greek.yml: no such file or directory" name=$WORK/home/user/.config/expanso/match/greek.yml time=2024-02-12T22:22:33.123+08:00 level=INFO msg=Get component=persistentState bucket=entryState key=$WORK/home/user/.config/expanso/match/greek.yml value="" time=2024-02-12T22:22:33.123+08:00 level=INFO msg=defaultPreApplyFunc targetRelPath=.config/expanso/match/greek.yml targetEntryState.Type=file targetEntryState.Mode=420 targetEntryState.ContentsSHA256=aadb376a3b662ac3d5eceb4fbcfa133ac6855cca2302a0ef9f106a6b7f441028 targetEntryState.contents="# `propagate_case` allows e.g.:\n# alpha^ => α\n# ALPHA^ => Α [o..." lastWrittenEntryState= actualEntryState.Type=remove actualEntryState.Mode=0 actualEntryState.ContentsSHA256="" time=2024-02-12T22:22:33.130+08:00 level=INFO msg=WriteFile component=system name=$WORK/home/user/.config/expanso/match/greek.yml size=1647 data="# `propagate_case` allows e.g.:\n# alpha^ => α\n# ALPHA^ => Α [o..." perm=420 time=2024-02-12T22:22:33.132+08:00 level=INFO msg=Set component=persistentState bucket=entryState key=$WORK/home/user/.config/expanso/match/greek.yml value="{\n \"type\": \"file\",\n \"mode\": 420,\n \"contentsSHA256\": \"aadb376a3b662ac3d5eceb4fbcfa133ac6855cca2302a0ef9f106a6b7f441028\"\n}\n" time=2024-02-12T22:22:33.134+08:00 level=INFO msg=Close component=persistentState > cmp $HOME/.config/expanso/match/greek.yml golden/greek.yml PASS === CONT TestScript/issue2964 === NAME TestScript/options testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that --source flag is respected (2.114s) > exec chezmoi apply --source=~/.dotfiles > cmp $HOME/.file golden/.file > chhome home2/user # test that --destination flag is respected (0.988s) > mkdir tmp > exec chezmoi apply --destination=$WORK/tmp > cmp tmp/.file golden/.file > chhome home3/user # test that --config flag is respected (0.999s) > exec chezmoi apply --config=$HOME/.chezmoi.toml > cmp $HOME/tmp/.file golden/.file PASS === NAME TestScript/issue796 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir > symlink $CHEZMOISOURCEDIR/dot_file2 -> dot_file > exec chezmoi apply --force > cmp $HOME/.file2 $HOME/.file PASS === CONT TestScript/issue2132 === CONT TestScript/issue2954 === CONT TestScript/issue2092 === NAME TestScript/secret testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/secret > [windows] unix2dos bin/secret.cmd # test secret template function (0.983s) > exec chezmoi execute-template '{{ secret "password" }}' [stdout] password> stdout ^password$ # test secretJSON template function (0.648s) > exec chezmoi execute-template '{{ (secretJSON "{\"password\":\"secret\"}").password }}' [stdout] secret> stdout ^secret$ > chhome home2/user # test secret.args (1.117s) > exec chezmoi execute-template '{{ secret "password" }}' [stdout] arg password> stdout '^arg password$' PASS === NAME TestScript/issue3008 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply does not get confused by multiple files in .chezmoidata (0.731s) > exec chezmoi apply PASS === CONT TestScript/issue2177 === NAME TestScript/issue3240 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 777 bin/custom-pager # test that chezmoi diff uses the custom pager if set (1.069s) > exec chezmoi diff [stdout] custom-pager > cmp stdout golden/stdout # test that chezmoi diff --verbose has identical output (0.671s) > exec chezmoi diff --verbose [stdout] custom-pager > cmp stdout golden/stdout # test that chezmoi apply uses the custom pager if set (0.656s) > exec chezmoi apply --dry-run --verbose [stdout] custom-pager > stdout custom-pager PASS === CONT TestScript/issue2016 === NAME TestScript/help testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > exec chezmoi help [stdout] Manage your dotfiles across multiple diverse machines, securely Usage: chezmoi [command] Available Commands: add Add an existing file, directory, or symlink to the source state age Interact with age apply Update the destination directory to match the target state archive Generate a tar archive of the target state cat Print the target contents of a file, script, or symlink cat-config Print the configuration file cd Launch a shell in the source directory chattr Change the attributes of a target in the source state completion Generate shell completion code data Print the template data decrypt Decrypt file or standard input diff Print the diff between the target state and the destination state doctor Check your system for potential problems dump Generate a dump of the target state dump-config Dump the configuration values edit Edit the source state of a target edit-config Edit the configuration file edit-config-template Edit the configuration file template encrypt Encrypt file or standard input execute-template Execute the given template(s) forget Remove a target from the source state generate Generate a file for use with chezmoi git Run git in the source directory help Print help about a command ignored Print ignored targets import Import an archive into the source state init Setup the source directory and update the destination directory to match the target state license Print license managed List the managed entries in the destination directory merge Perform a three-way merge between the destination state, the source state, and the target state merge-all Perform a three-way merge for each modified file purge Purge chezmoi's configuration and data re-add Re-add modified files remove Remove a target from the source state and the destination directory secret Interact with a secret manager source-path Print the source path of a target state Manipulate the persistent state status Show the status of targets target-path Print the target path of a source path unmanaged List the unmanaged files in the destination directory update Pull and apply any changes upgrade Upgrade chezmoi to the latest released version verify Exit with success if the destination state matches the target state, fail otherwise Flags: --cache path Set cache directory (default $WORK/home/user/.cache/chezmoi) --color bool|auto Colorize output (default auto) -c, --config path Set config file --config-format json|toml|yaml Set config file format --debug Include debug information in output -D, --destination path Set destination directory (default $WORK/home/user) -n, --dry-run Do not make any modifications to the destination directory --force Make all changes without prompting --interactive Prompt for all changes -k, --keep-going Keep going as far as possible after an error --mode mode Mode --no-pager Do not use the pager --no-tty Do not attempt to get a TTY for prompts -o, --output path Write output to path instead of stdout --persistent-state path Set persistent state file --progress bool|auto Display progress bars (default auto) -R, --refresh-externals always|auto|never[=always] Refresh external cache (default auto) -S, --source path Set source directory (default $WORK/home/user/.local/share/chezmoi) --source-path Specify targets by source path --use-builtin-age bool|auto Use builtin age (default auto) --use-builtin-git bool|auto Use builtin git (default auto) -v, --verbose Make output more verbose -W, --working-tree path Set working tree directory (default ) Use "chezmoi [command] --help" for more information about a command. > stdout 'Manage your dotfiles across multiple diverse machines, securely' > exec chezmoi help add [stdout] Description: Add targets to the source state. If any target is already in the source state, then its source state is replaced with its current state in the destination directory. Usage: chezmoi add targets... [flags] Aliases: add, manage Examples: $ chezmoi add ~/.bashrc $ chezmoi add ~/.gitconfig --template $ chezmoi add ~/.ssh/id_rsa --encrypt $ chezmoi add ~/.vim --recursive $ chezmoi add ~/.oh-my-zsh --exact --recursive Flags: -a, --autotemplate Generate the template when adding files as templates --create Add files that should exist, irrespective of their contents --encrypt Encrypt files --exact Add directories exactly -x, --exclude types Exclude entry types (default none) -f, --follow Add symlink targets instead of symlinks -i, --include types Include entry types (default all) -p, --prompt Prompt before adding each entry -q, --quiet Suppress warnings -r, --recursive Recurse into subdirectories (default true) --secrets ignore|warning|error Scan for secrets when adding unencrypted files (default warning) -T, --template Add files as templates --template-symlinks Add symlinks with target in source or home dirs as templates Global Flags: --cache path Set cache directory (default $WORK/home/user/.cache/chezmoi) --color bool|auto Colorize output (default auto) -c, --config path Set config file --config-format json|toml|yaml Set config file format --debug Include debug information in output -D, --destination path Set destination directory (default $WORK/home/user) -n, --dry-run Do not make any modifications to the destination directory --force Make all changes without prompting --interactive Prompt for all changes -k, --keep-going Keep going as far as possible after an error --mode mode Mode --no-pager Do not use the pager --no-tty Do not attempt to get a TTY for prompts -o, --output path Write output to path instead of stdout --persistent-state path Set persistent state file --progress bool|auto Display progress bars (default auto) -R, --refresh-externals always|auto|never[=always] Refresh external cache (default auto) -S, --source path Set source directory (default $WORK/home/user/.local/share/chezmoi) --source-path Specify targets by source path --use-builtin-age bool|auto Use builtin age (default auto) --use-builtin-git bool|auto Use builtin git (default auto) -v, --verbose Make output more verbose -W, --working-tree path Set working tree directory (default ) > stdout 'Add targets to the source state\.' PASS === CONT TestScript/issue1213 === NAME TestScript/scriptorder_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi apply runs scripts in the correct order (2.750s) > symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_before_00-chezmoiscripts-before -> ../.script.sh > symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_before_99-chezmoiscripts-before -> ../.script.sh > symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_00-chezmoiscripts -> ../.script.sh > symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_99-chezmoiscripts -> ../.script.sh > symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_after_00-chezmoiscripts-after -> ../.script.sh > symlink home/user/.local/share/chezmoi/.chezmoiscripts/run_after_99-chezmoiscripts-after -> ../.script.sh > symlink home/user/.local/share/chezmoi/run_before_00-before -> .script.sh > symlink home/user/.local/share/chezmoi/run_before_99-before -> .script.sh > symlink home/user/.local/share/chezmoi/run_00 -> .script.sh > symlink home/user/.local/share/chezmoi/run_99 -> .script.sh > symlink home/user/.local/share/chezmoi/run_after_00-after -> .script.sh > symlink home/user/.local/share/chezmoi/run_after_99-after -> .script.sh > exec chezmoi apply --force [stdout] 00-chezmoiscripts-before 99-chezmoiscripts-before 00-before 99-before 00-chezmoiscripts 99-chezmoiscripts 00 99 00-chezmoiscripts-after 99-chezmoiscripts-after 00-after 99-after > cmp stdout golden/apply PASS === CONT TestScript/issue1869 === NAME TestScript/generate testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkgitconfig # test that chezmoi generate install.sh generates a shell script (2.408s) > exec chezmoi generate install.sh [stdout] #!/bin/sh # -e: exit on error # -u: exit on unset variables set -eu if ! chezmoi="$(command -v chezmoi)"; then bin_dir="${HOME}/.local/bin" chezmoi="${bin_dir}/chezmoi" echo "Installing chezmoi to '${chezmoi}'" >&2 if command -v curl >/dev/null; then chezmoi_install_script="$(curl -fsSL get.chezmoi.io)" elif command -v wget >/dev/null; then chezmoi_install_script="$(wget -qO- get.chezmoi.io)" else echo "To install chezmoi, you must have curl or wget installed." >&2 exit 1 fi sh -c "${chezmoi_install_script}" -- -b "${bin_dir}" unset chezmoi_install_script bin_dir fi # POSIX way to get script's dir: https://stackoverflow.com/a/29834779/12156188 script_dir="$(cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P)" set -- init --apply --source="${script_dir}" echo "Running 'chezmoi $*'" >&2 # exec: replace current process with chezmoi exec "$chezmoi" "$@" > stdout '#!/bin/sh' > [!exec:git] skip 'git not found in $PATH' # test that chezmoi generate git-commit-message generates a git commit message (1.685s) > exec git --git-dir=$CHEZMOISOURCEDIR/.git init [stdout] Initialized empty Git repository in $WORK/home/user/.local/share/chezmoi/.git/ > exec chezmoi git add . > exec chezmoi generate git-commit-message [stdout] Add .file > stdout '^Add .file$' PASS === CONT TestScript/issue1161 === NAME TestScript/issue2577 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 bin/fossil # test that chezmoi update runs a custom update command and applies changes (0.624s) > exec chezmoi update > cmp $HOME/.file golden/.file PASS === NAME TestScript/textconv testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!exec:tr] skip 'tr not found in $PATH' # test that chezmoi diff uses textconv (1.935s) > exec chezmoi diff [stdout] diff --git a/file.txt b/file.txt index b0ebb2af412bf3812b0bf8c5d7b950feb8a701be..4d977287915d918f15ef3df13146c1fa58914d30 100644 --- a/file.txt +++ b/file.txt @@ -1 +1 @@ -# PREVIOUS CONTENTS OF FILE.TXT +# CONTENTS OF FILE.TXT > [umask:002] cmp stdout golden/diff-umask-002 > [umask:022] cmp stdout golden/diff-umask-022 # test that chezmoi apply uses textconv (1.536s) > exec chezmoi apply --verbose [stdout] diff --git a/file.txt b/file.txt index b0ebb2af412bf3812b0bf8c5d7b950feb8a701be..4d977287915d918f15ef3df13146c1fa58914d30 100644 --- a/file.txt +++ b/file.txt @@ -1 +1 @@ -# PREVIOUS CONTENTS OF FILE.TXT +# CONTENTS OF FILE.TXT > [umask:002] cmp stdout golden/diff-umask-002 > [umask:022] cmp stdout golden/diff-umask-022 > cmp $HOME/file.txt golden/file.txt # test that chezmoi apply uses textconv in interactive diffs (1.033s) > edit $HOME/file.txt > stdin golden/diff-overwrite > exec chezmoi apply --no-tty [stdout] file.txt has changed since chezmoi last wrote it (diff/overwrite/all-overwrite/skip/quit)? diff --git a/file.txt b/file.txt index 6f0f7ad1723290ba1069a77e8eedbe212a876d87..4d977287915d918f15ef3df13146c1fa58914d30 100644 --- a/file.txt +++ b/file.txt @@ -1,2 +1 @@ # CONTENTS OF FILE.TXT -# EDITED file.txt has changed since chezmoi last wrote it (diff/overwrite/all-overwrite/skip/quit)? > stdout '^ # CONTENTS OF FILE.TXT' > stdout '^-# EDITED' PASS === CONT TestScript/scriptpython === NAME TestScript/keepassxc testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/keepassxc-cli > [windows] unix2dos bin/keepassxc-cli.cmd # test keepassxcAttachment template function (0.913s) > stdin $HOME/input > exec chezmoi execute-template --no-tty '{{ keepassxcAttachment "example.com" "attachment" }}' [stdout] Enter password to unlock /secrets.kdbx: # contents of attachment > stdout '# contents of attachment' # test keepassxcAttribute template function (0.762s) > stdin $HOME/input > exec chezmoi execute-template --no-tty '{{ keepassxcAttribute "example.com" "host-name" }}' [stdout] Enter password to unlock /secrets.kdbx: example.com> stdout example\.com$ # test keepassxc template function and that password is only requested once (0.888s) > stdin $HOME/input > exec chezmoi execute-template --no-tty '{{ (keepassxc "example.com").UserName }}/{{ (keepassxc "example.com").Password }}' [stdout] Enter password to unlock /secrets.kdbx: examplelogin/examplepassword> stdout examplelogin/examplepassword$ PASS === NAME TestScript/scriptpython cmd.go:381: python3 not found in $PATH === CONT TestScript/issue2427 === NAME TestScript/scriptpython testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:python3] skip 'python3 not found in $PATH' === CONT TestScript/issue1866 === CONT TestScript/inittemplatefuncs === CONT TestScript/issue2934 === NAME TestScript/issue2995 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply only creates empty files if they have the empty_ attribute (0.636s) > exec chezmoi apply > ! exists $HOME/new.txt > exists $HOME/create-new.txt > cmp $HOME/existing.txt golden/existing.txt > cmp $HOME/existing-empty.txt golden/existing-empty.txt PASS === CONT TestScript/initconfig === NAME TestScript/modesymlink testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir golden > mksourcedir # test that chezmoi apply does not create symlinks by default (0.761s) > exec chezmoi apply > cmp $HOME/.create golden/.create > ! issymlink $HOME/.create > cmp $HOME/.dir/file golden/.dir/file > ! issymlink $HOME/.dir/file > cmp $HOME/.dir/subdir/file golden/.dir/subdir/file > ! issymlink $HOME/.dir/subdir/file > cmp $HOME/.empty golden/.empty > ! issymlink $HOME/.empty > cmp $HOME/.executable golden/.executable > ! issymlink $HOME/.executable > cmp $HOME/.file golden/.file > ! issymlink $HOME/.file > cmp $HOME/.private golden/.private > ! issymlink $HOME/.private > ! exists $HOME/.remove > cmp $HOME/.template golden/.template > ! issymlink $HOME/.template # test that chezmoi apply --mode=symlink creates symlinks where possible (1.209s) > exec chezmoi apply --mode=symlink > cmp $HOME/.create golden/.create > ! issymlink $HOME/.create > cmp $HOME/.dir/file golden/.dir/file > issymlink $HOME/.dir/file > cmp $HOME/.dir/subdir/file golden/.dir/subdir/file > issymlink $HOME/.dir/subdir/file > cmp $HOME/.empty golden/.empty > issymlink $HOME/.empty > cmp $HOME/.executable golden/.executable > ! issymlink $HOME/.executable > cmp $HOME/.file golden/.file > issymlink $HOME/.file > cmp $HOME/.private golden/.private > ! issymlink $HOME/.private > ! exists $HOME/.remove > cmp $HOME/.template golden/.template > ! issymlink $HOME/.template PASS === NAME TestScript/removedir testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply removes empty directories, but not non-empty directories, or non-existent directories (0.290s) > mkdir $HOME/.empty_dir > exec chezmoi apply > exists $HOME/.dir > ! exists $HOME/.empty_dir > chhome home2/user # test that chezmoi apply will remove a directory even if it is actually a file (3.104s) > exec chezmoi apply > ! exists $HOME/.dir > chhome home3/user # test that chezmoi apply removes empty directories recursively (1.155s) > mkdir $HOME/.dir/subdir > exec chezmoi apply > ! exists $HOME/.dir PASS === CONT TestScript/issue2500 === NAME TestScript/mergeall_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi merge-all does not run the merge command if nothing is modified (2.683s) > exec chezmoi merge-all > ! stdout . # test that chezmoi merge-all runs the merge command if a file is modified (0.861s) > edit $HOME/.file > exec chezmoi merge-all [stdout] $WORK/home/user/.file $WORK/home/user/.local/share/chezmoi/dot_file.tmpl $WORK/.tmp/chezmoi-merge1273129358/.file > stdout ^${HOME@R}/\.file\s+${CHEZMOISOURCEDIR@R}/dot_file\.tmpl\s+${WORK@R}/.*/\.file$ > chhome home2/user # test that chezmoi merge-all only merges files (0.699s) > exec chezmoi merge-all > ! stdout . > ! stderr . PASS === CONT TestScript/issue1832 === CONT TestScript/issue2937 === NAME TestScript/keepgoing testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir # test that chezmoi diff without --keep-going fails when there is an error (1.290s) > ! exec chezmoi diff [stdout] diff --git a/1ok b/1ok new file mode 100644 index 0000000000000000000000000000000000000000..9c59e24b8393179a5d712de4f990178df5734d99 --- /dev/null +++ b/1ok @@ -0,0 +1 @@ +first [stderr] chezmoi: template: 2error.tmpl:2: unclosed action started at 2error.tmpl:1 [exit status 1] # test that chezmoi apply without --keep-going fails but still writes the first file (0.630s) > ! exec chezmoi apply --force [stderr] chezmoi: template: 2error.tmpl:2: unclosed action started at 2error.tmpl:1 [exit status 1] > cmp $HOME/1ok golden/1ok > ! exists $HOME/2error > ! exists $HOME/3ok # test that chezmoi apply with --keep-going writes all files that it can without errors (0.639s) > ! exec chezmoi apply --force --keep-going [stderr] chezmoi: template: 2error.tmpl:2: unclosed action started at 2error.tmpl:1 [exit status 1] > cmp $HOME/1ok golden/1ok > ! exists $HOME/2error > cmp $HOME/3ok golden/3ok # FIXME add chezmoi init tests # FIXME add chezmoi update tests (0.000s) PASS === CONT TestScript/issue1794 cmd.go:381: age not found in $PATH testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:age] skip 'age not found in $PATH' === NAME TestScript/issue3051 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi add respects .chezmoiignore in the presence of protected paths (1.102s) > exec chezmoi add -r $HOME${/}.local [stderr] chezmoi: warning: ignoring .local/share/chezmoi chezmoi: warning: ignoring .local/share/chezmoi/.chezmoiignore > exists $CHEZMOISOURCEDIR/dot_local/bin/hello.sh PASS === NAME TestScript/issue3418 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi execute-template --init does read .chezmoitemplates (0.685s) > stdin $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi execute-template [stdout] # contents of template > stdout 'contents of template' # test that chezmoi execute-template --init does not read .chezmoitemplates (1.325s) > stdin $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > ! exec chezmoi execute-template --init [stderr] chezmoi: template: stdin:1:12: executing "stdin" at <{{template "template"}}>: template "template" not defined [exit status 1] > ! stdout 'contents of template' PASS === CONT TestScript/issue2865 === NAME TestScript/issue2300 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # FIXME # test that chezmoi edit --apply applies changes to a directory (0.687s) > exec chezmoi edit --apply $HOME/.dir > grep '# edited' $HOME/.dir/file PASS === CONT TestScript/issue1666 === CONT TestScript/issue1365 === NAME TestScript/issue2599 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply --interactive --verbose does not prompt for empty scripts (0.889s) > exec chezmoi apply --interactive --no-tty --verbose PASS === NAME TestScript/data testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi data includes data set in config file (1.116s) > exec chezmoi data [stdout] { "chezmoi": { "arch": "riscv64", "args": [ "chezmoi", "data" ], "cacheDir": "$WORK/home/user/.cache/chezmoi", "command": "data", "commandDir": "$WORK", "config": { "add": { "encrypt": false, "secrets": "warning", "templateSymlinks": false }, "age": { "args": null, "command": "age", "identities": null, "identity": {}, "passphrase": false, "recipient": "", "recipients": null, "recipientsFile": {}, "recipientsFiles": null, "suffix": ".age", "symmetric": false, "useBuiltin": false }, "awsSecretsManager": { "profile": "", "region": "" }, "azureKeyVault": { "defaultVault": "" }, "bitwarden": { "command": "bw" }, "bitwardenSecrets": { "command": "bws" }, "cacheDir": {}, "cd": { "args": null, "command": "" }, "color": {}, "completion": { "custom": false }, "dashlane": { "args": null, "command": "dcli" }, "data": { "uniqueKey": "uniqueValue" }, "destDir": {}, "diff": { "args": null, "command": "", "exclude": [], "pager": "\u0000", "reverse": false, "scriptContents": true }, "doppler": { "args": null, "command": "doppler", "config": "", "project": "" }, "edit": { "apply": false, "args": null, "command": "", "hardlink": true, "minDuration": 1000000000, "watch": false }, "ejson": { "key": "", "keyDir": "/opt/ejson/keys" }, "encryption": "", "env": null, "format": "json", "git": { "autoadd": false, "autocommit": false, "autopush": false, "command": "git", "commitMessageTemplate": "", "commitMessageTemplateFile": "" }, "gitHub": { "refreshPeriod": 60000000000 }, "gopass": { "command": "gopass" }, "gpg": { "args": null, "command": "gpg", "recipient": "", "recipients": null, "suffix": ".asc", "symmetric": false }, "hcpVaultSecrets": { "applicationName": "", "args": null, "command": "vlt", "organizationId": "", "projectId": "" }, "hooks": null, "interpreters": {}, "keepassxc": { "args": null, "command": "keepassxc-cli", "database": {}, "mode": "cache-password", "prompt": true }, "keeper": { "args": null, "command": "keeper" }, "lastpass": { "command": "lpass" }, "merge": { "args": null, "command": "vimdiff" }, "mode": "", "onepassword": { "command": "op", "prompt": true }, "pager": "", "pass": { "command": "pass" }, "passhole": { "args": null, "command": "ph", "prompt": true }, "persistentState": {}, "pinentry": { "args": null, "command": "", "options": [ "allow-external-password-cache" ] }, "progress": {}, "rbw": { "command": "rbw" }, "safe": true, "scriptEnv": null, "scriptTempDir": {}, "secret": { "args": null, "command": "" }, "sourceDir": {}, "status": { "exclude": [], "pathStyle": "relative" }, "template": { "options": [ "missingkey=error" ] }, "textConv": null, "umask": 18, "update": { "apply": true, "args": null, "command": "", "recurseSubmodules": true }, "useBuiltinAge": {}, "useBuiltinGit": {}, "vault": { "command": "vault" }, "verbose": false, "verify": { "exclude": [] }, "warnings": { "configFileTemplateHasChanged": true }, "workingTree": {} }, "configFile": "$WORK/home/user/.config/chezmoi/chezmoi.toml", "executable": "/tmp/testscript-main3957720979/bin/chezmoi", "fqdnHostname": "arch-nspawn-498843", "gid": "1001", "group": "builduser", "homeDir": "$WORK/home/user", "hostname": "arch-nspawn-498843", "kernel": { "osrelease": "6.1.61-3-sophgo-multi-08357-g369f7207fe69", "ostype": "Linux", "version": "#1 SMP Sat, 30 Dec 2023 06:54:24 +0000" }, "os": "linux", "osRelease": { "ansiColor": "38;2;23;147;209", "bugReportURL": "https://gitlab.archlinux.org/groups/archlinux/-/issues", "buildID": "rolling", "documentationURL": "https://wiki.archlinux.org/", "homeURL": "https://archlinux.org/", "id": "arch", "logo": "archlinux-logo", "name": "Arch Linux", "prettyName": "Arch Linux", "privacyPolicyURL": "https://terms.archlinux.org/docs/privacy-policy/", "supportURL": "https://bbs.archlinux.org/" }, "pathListSeparator": ":", "pathSeparator": "/", "sourceDir": "$WORK/home/user/.local/share/chezmoi", "uid": "1001", "username": "builduser", "version": { "builtBy": "testscript", "commit": "HEAD", "date": "2024-02-12T14:22:32Z", "version": "v2.0.0+test" }, "windowsVersion": {}, "workingTree": "$WORK/home/user/.local/share/chezmoi" }, "uniqueKey": "uniqueValue" } > stdout '"chezmoi":' > stdout '"uniqueKey": "uniqueValue"' # test that chezmoi data --format=json includes data set in config file (0.591s) > exec chezmoi data --format=json [stdout] { "chezmoi": { "arch": "riscv64", "args": [ "chezmoi", "data", "--format=json" ], "cacheDir": "$WORK/home/user/.cache/chezmoi", "command": "data", "commandDir": "$WORK", "config": { "add": { "encrypt": false, "secrets": "warning", "templateSymlinks": false }, "age": { "args": null, "command": "age", "identities": null, "identity": {}, "passphrase": false, "recipient": "", "recipients": null, "recipientsFile": {}, "recipientsFiles": null, "suffix": ".age", "symmetric": false, "useBuiltin": false }, "awsSecretsManager": { "profile": "", "region": "" }, "azureKeyVault": { "defaultVault": "" }, "bitwarden": { "command": "bw" }, "bitwardenSecrets": { "command": "bws" }, "cacheDir": {}, "cd": { "args": null, "command": "" }, "color": {}, "completion": { "custom": false }, "dashlane": { "args": null, "command": "dcli" }, "data": { "uniqueKey": "uniqueValue" }, "destDir": {}, "diff": { "args": null, "command": "", "exclude": [], "pager": "\u0000", "reverse": false, "scriptContents": true }, "doppler": { "args": null, "command": "doppler", "config": "", "project": "" }, "edit": { "apply": false, "args": null, "command": "", "hardlink": true, "minDuration": 1000000000, "watch": false }, "ejson": { "key": "", "keyDir": "/opt/ejson/keys" }, "encryption": "", "env": null, "format": "json", "git": { "autoadd": false, "autocommit": false, "autopush": false, "command": "git", "commitMessageTemplate": "", "commitMessageTemplateFile": "" }, "gitHub": { "refreshPeriod": 60000000000 }, "gopass": { "command": "gopass" }, "gpg": { "args": null, "command": "gpg", "recipient": "", "recipients": null, "suffix": ".asc", "symmetric": false }, "hcpVaultSecrets": { "applicationName": "", "args": null, "command": "vlt", "organizationId": "", "projectId": "" }, "hooks": null, "interpreters": {}, "keepassxc": { "args": null, "command": "keepassxc-cli", "database": {}, "mode": "cache-password", "prompt": true }, "keeper": { "args": null, "command": "keeper" }, "lastpass": { "command": "lpass" }, "merge": { "args": null, "command": "vimdiff" }, "mode": "", "onepassword": { "command": "op", "prompt": true }, "pager": "", "pass": { "command": "pass" }, "passhole": { "args": null, "command": "ph", "prompt": true }, "persistentState": {}, "pinentry": { "args": null, "command": "", "options": [ "allow-external-password-cache" ] }, "progress": {}, "rbw": { "command": "rbw" }, "safe": true, "scriptEnv": null, "scriptTempDir": {}, "secret": { "args": null, "command": "" }, "sourceDir": {}, "status": { "exclude": [], "pathStyle": "relative" }, "template": { "options": [ "missingkey=error" ] }, "textConv": null, "umask": 18, "update": { "apply": true, "args": null, "command": "", "recurseSubmodules": true }, "useBuiltinAge": {}, "useBuiltinGit": {}, "vault": { "command": "vault" }, "verbose": false, "verify": { "exclude": [] }, "warnings": { "configFileTemplateHasChanged": true }, "workingTree": {} }, "configFile": "$WORK/home/user/.config/chezmoi/chezmoi.toml", "executable": "/tmp/testscript-main3957720979/bin/chezmoi", "fqdnHostname": "arch-nspawn-498843", "gid": "1001", "group": "builduser", "homeDir": "$WORK/home/user", "hostname": "arch-nspawn-498843", "kernel": { "osrelease": "6.1.61-3-sophgo-multi-08357-g369f7207fe69", "ostype": "Linux", "version": "#1 SMP Sat, 30 Dec 2023 06:54:24 +0000" }, "os": "linux", "osRelease": { "ansiColor": "38;2;23;147;209", "bugReportURL": "https://gitlab.archlinux.org/groups/archlinux/-/issues", "buildID": "rolling", "documentationURL": "https://wiki.archlinux.org/", "homeURL": "https://archlinux.org/", "id": "arch", "logo": "archlinux-logo", "name": "Arch Linux", "prettyName": "Arch Linux", "privacyPolicyURL": "https://terms.archlinux.org/docs/privacy-policy/", "supportURL": "https://bbs.archlinux.org/" }, "pathListSeparator": ":", "pathSeparator": "/", "sourceDir": "$WORK/home/user/.local/share/chezmoi", "uid": "1001", "username": "builduser", "version": { "builtBy": "testscript", "commit": "HEAD", "date": "2024-02-12T14:22:32Z", "version": "v2.0.0+test" }, "windowsVersion": {}, "workingTree": "$WORK/home/user/.local/share/chezmoi" }, "uniqueKey": "uniqueValue" } > stdout '"chezmoi":' > stdout '"uniqueKey": "uniqueValue"' # test that chezmoi data --format=yaml includes data set in config file (0.869s) > exec chezmoi data --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --format=yaml cacheDir: $WORK/home/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: uniqueKey: uniqueValue destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home/user/.config/chezmoi/chezmoi.toml executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: $WORK/home/user/.local/share/chezmoi uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:33Z" version: v2.0.0+test windowsVersion: {} workingTree: $WORK/home/user/.local/share/chezmoi uniqueKey: uniqueValue > stdout 'chezmoi:' > stdout 'uniqueKey: uniqueValue' PASS === CONT TestScript/issue2380 === CONT TestScript/importxz === CONT TestScript/bitwarden === NAME TestScript/templatedirectives testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test --left-delimiter and --right-delimiter flags to chezmoi execute-template (1.044s) > exec chezmoi execute-template --left-delimiter=[[ --right-delimiter=]] '[[ "ok" ]]' [stdout] ok> stdout ^ok$ # test that template delimiters can be set in files (1.136s) > exec chezmoi cat $HOME${/}template [stdout] (nested) > cmp stdout golden/template PASS === NAME TestScript/issue2942 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that .chezmoi.config variables are capitalized correctly (1.173s) > exec chezmoi execute-template '{{ .chezmoi.config.keepassxc.command }}' [stdout] keepassxc-cli> stdout '^keepassxc-cli$' PASS === CONT TestScript/issue2510 === CONT TestScript/importzip === NAME TestScript/issue2315 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # Test that chezmoi init runs run_before_ scripts before executing templates (0.864s) > env PATH=$PATH:$HOME/bin > exec chezmoi init --apply > cmp $HOME/.file golden/.file PASS === NAME TestScript/keeper testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/keeper > [windows] unix2dos bin/keeper.cmd # test keeper template function (2.960s) > exec chezmoi execute-template '{{ (keeper "QOahgRH_dSTvSvhRBqzCzQ").record_uid }}' [stdout] QOahgRH_dSTvSvhRBqzCzQ> stdout '^QOahgRH_dSTvSvhRBqzCzQ$' # test keeperDataFields template function (0.776s) > exec chezmoi execute-template '{{ index (keeperDataFields "QOahgRH_dSTvSvhRBqzCzQ").password 0 }}' [stdout] mypassword> stdout ^mypassword$ # test keeperFindPassword template function (0.671s) > exec chezmoi execute-template '{{ keeperFindPassword "Example" }}' [stdout] mypassword> stdout ^mypassword$ PASS === CONT TestScript/scriptperl === NAME TestScript/issue3257 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 bin/custom-pager # test that chezmoi add invokes the pager when verbose is set (2.610s) > exec chezmoi add $HOME${/}.file [stdout] custom-pager > stdout custom-pager # test chat chezmoi chattr invokes the pager when verbose is set (0.812s) > exec chezmoi chattr +private $HOME${/}.file [stdout] custom-pager > stdout custom-pager # test that chezmoi status does not invoke the pager when verbose is set (1.082s) > exec chezmoi status [stdout] M .file > ! stdout custom-pager PASS === NAME TestScript/dumpconfig testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi dump-config dumps the configuration in the given format (1.171s) > exec chezmoi dump-config --format=yaml [stdout] configfile: cacheDir: $WORK/home/user/.cache/chezmoi color: auto data: key: value env: {} format: yaml destDir: $WORK/home/user gitHub: refreshPeriod: 1m0s hooks: {} interpreters: {} mode: "" pager: "" persistentState: "" pinentry: command: "" args: [] options: - allow-external-password-cache progress: auto safe: true scriptEnv: {} scriptTempDir: "" sourceDir: $WORK/home/user/.local/share/chezmoi template: options: - missingkey=error textConv: [] umask: 18 useBuiltinAge: auto useBuiltinGit: auto verbose: false warnings: configFileTemplateHasChanged: true workingTree: $WORK/home/user/.local/share/chezmoi awsSecretsManager: region: "" profile: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws dashlane: command: dcli args: [] doppler: command: doppler args: [] project: "" config: "" ejson: keyDir: /opt/ejson/keys key: "" gopass: command: gopass hcpVaultSecrets: command: vlt args: [] applicationName: "" organizationId: "" projectId: "" keepassxc: command: keepassxc-cli database: "" mode: cache-password args: [] prompt: true keeper: command: keeper args: [] lastpass: command: lpass onepassword: command: op prompt: true pass: command: pass passhole: command: ph args: [] prompt: true rbw: command: rbw secret: command: "" args: [] vault: command: vault encryption: "" age: useBuiltin: false command: age args: [] identity: "" identities: [] passphrase: false recipient: "" recipients: [] recipientsFile: "" recipientsFiles: [] suffix: .age symmetric: false gpg: command: gpg args: [] recipient: "" recipients: [] symmetric: false suffix: .asc add: encrypt: false secrets: warning templateSymlinks: false cd: command: "" args: [] completion: custom: false diff: command: "" args: [] exclude: [] pager: "\0" reverse: false scriptContents: true edit: command: "" args: [] hardlink: true minDuration: 1s watch: false apply: false git: command: git autoadd: false autocommit: false autopush: false commitMessageTemplate: "" commitMessageTemplateFile: "" merge: command: vimdiff args: [] status: exclude: [] pathStyle: relative update: command: "" args: [] apply: true recurseSubmodules: true verify: exclude: [] > stdout 'key: value' PASS === CONT TestScript/import === CONT TestScript/importtarzst === NAME TestScript/issue2609 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi apply uses the umask from the configuration file (1.130s) > exec chezmoi apply > cmpmod 600 $HOME/.file PASS === CONT TestScript/issue2861 === CONT TestScript/scriptenv === NAME TestScript/applychmod_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > mkhomedir golden > mkhomedir > mksourcedir # test change file mode (0.791s) > chmod 777 $HOME/.file > exec chezmoi apply --force > cmpmod 666 $HOME/.file # test change executable file mode (0.691s) > chmod 666 $HOME/.executable > exec chezmoi apply --force > cmpmod 777 $HOME/.executable # test change directory mode (0.920s) > chmod 700 $HOME/.dir > exec chezmoi apply --force > cmpmod 777 $HOME/.dir PASS === NAME TestScript/issue2137 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply fails if .chezmoiversion requires a more recent version (1.559s) > ! exec chezmoi apply [stderr] chezmoi: source state requires chezmoi version 3.0.0 or later, chezmoi is version 2.0.0+test [exit status 1] > stderr 'source state requires chezmoi version 3\.0\.0 or later' # test that chezmoi init fails if .chezmoiversion requires a more recent version (0.599s) > ! exec chezmoi init [stderr] chezmoi: source state requires chezmoi version 3.0.0 or later, chezmoi is version 2.0.0+test [exit status 1] > stderr 'source state requires chezmoi version 3\.0\.0 or later' PASS === NAME TestScript/dumpyaml testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!umask:022] skip > mksourcedir > exec chezmoi dump --format=yaml [stdout] .create: type: file name: .create contents: | # contents of .create perm: 420 .dir: type: dir name: .dir perm: 493 .dir/file: type: file name: .dir/file contents: | # contents of .dir/file perm: 420 .dir/subdir: type: dir name: .dir/subdir perm: 493 .dir/subdir/file: type: file name: .dir/subdir/file contents: | # contents of .dir/subdir/file perm: 420 .empty: type: file name: .empty contents: "" perm: 420 .executable: type: file name: .executable contents: | # contents of .executable perm: 493 .file: type: file name: .file contents: | # contents of .file perm: 420 .private: type: file name: .private contents: | # contents of .private perm: 384 .readonly: type: file name: .readonly contents: | # contents of .readonly perm: 292 .symlink: type: symlink name: .symlink linkname: .dir/subdir/file .template: type: file name: .template contents: | key = value perm: 420 > cmp stdout golden/dump.yaml > exec chezmoi dump --exclude=dirs --format=yaml [stdout] .create: type: file name: .create contents: | # contents of .create perm: 420 .dir/file: type: file name: .dir/file contents: | # contents of .dir/file perm: 420 .dir/subdir/file: type: file name: .dir/subdir/file contents: | # contents of .dir/subdir/file perm: 420 .empty: type: file name: .empty contents: "" perm: 420 .executable: type: file name: .executable contents: | # contents of .executable perm: 493 .file: type: file name: .file contents: | # contents of .file perm: 420 .private: type: file name: .private contents: | # contents of .private perm: 384 .readonly: type: file name: .readonly contents: | # contents of .readonly perm: 292 .symlink: type: symlink name: .symlink linkname: .dir/subdir/file .template: type: file name: .template contents: | key = value perm: 420 > cmp stdout golden/dump-except-dirs.yaml PASS === NAME TestScript/applystate testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:sha256sum] skip 'sha256sum not found in path' > mksourcedir # test that chezmoi apply does not modify the state if nothing needs to be done (2.450s) > exec chezmoi apply --force > exec sha256sum $CHEZMOICONFIGDIR/chezmoistate.boltdb [stdout] ba0824b0a788717f91d93832f686cbbe7deb4872de937ee6fa0593c2f961540a $WORK/home/user/.config/chezmoi/chezmoistate.boltdb > cp stdout chezmoistate.boltdb-sha256-pre-apply > exec chezmoi apply --force > exec sha256sum $CHEZMOICONFIGDIR/chezmoistate.boltdb [stdout] ba0824b0a788717f91d93832f686cbbe7deb4872de937ee6fa0593c2f961540a $WORK/home/user/.config/chezmoi/chezmoistate.boltdb > cmp stdout chezmoistate.boltdb-sha256-pre-apply PASS === NAME TestScript/issue3232 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > exec tar czf www/archive1.tar.gz archive1 > exec tar czf www/archive2.tar.gz archive2 > httpd www # test that chezmoi externals allow multiple non-conflicting archives (0.908s) > exec chezmoi apply > cmp $HOME/.dir/file1 archive1/file1 > cmp $HOME/.dir/file2 archive2/file2 > chhome home2/user # test that chezmoi externals do not allow multiple conflicting archives (1.294s) > ! exec chezmoi apply [stderr] chezmoi: .dir/file1: inconsistent state (http://127.0.0.1:41017/archive1.tar.gz defined in $WORK/home2/user/.local/share/chezmoi/.chezmoiexternals/archive1.toml.tmpl, http://127.0.0.1:41017/archive1.tar.gz defined in $WORK/home2/user/.local/share/chezmoi/.chezmoiexternals/archive2.toml.tmpl) [exit status 1] > stderr 'inconsistent state' PASS === NAME TestScript/issue3414 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > exec tar czf www/archive.tar.gz archive > httpd www # test that running chezmoi apply twice does not complain about modified files (2.536s) > exec chezmoi apply > exec chezmoi apply --no-tty PASS === NAME TestScript/issue2354 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi source-path does not read the source state if not needed (1.241s) > exec chezmoi source-path [stdout] $WORK/home/user/.local/share/chezmoi > stdout ${CHEZMOISOURCEDIR@R} PASS === NAME TestScript/issue1866 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi ignores emacs symbolic link locks (0.634s) > symlink 'home/user/.local/share/chezmoi/.#lock' -> invalid > exec chezmoi apply > cmp $HOME/.file golden/.file PASS === NAME TestScript/vault testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/vault > [windows] unix2dos bin/vault.cmd # test vault template function (1.738s) > exec chezmoi execute-template '{{ (vault "secret/examplesecret").data.data.password }}' [stdout] examplepassword> stdout ^examplepassword$ PASS === NAME TestScript/issue2954 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi remove does not delete the source directory when removing a file in an exact directory (0.990s) > mkdir $HOME/.dir > mkfile $HOME/.dir/test.file > exec chezmoi remove --force $HOME${/}.dir/test.file > exists $CHEZMOISOURCEDIR PASS === NAME TestScript/issue2283 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that sourceDir has the correct value in chezmoi init with .chezmoiroot (1.217s) > exec chezmoi init > cmpenv $CHEZMOICONFIGDIR/chezmoi.yaml golden/chezmoi.yaml PASS === NAME TestScript/issue2964 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 $CHEZMOISOURCEDIR/external_dot_dir/executable # test that external_ directories respect the executable bit (1.174s) > exec chezmoi apply > [umask:002] cmpmod 775 $HOME/.dir/executable > [umask:022] cmpmod 755 $HOME/.dir/executable PASS === NAME TestScript/issue1666 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi apply --verbose does not display scripts that are run always, but does run them (0.686s) > exec chezmoi apply --verbose [stdout] script > cmp stdout golden/apply > ! stderr . PASS === NAME TestScript/issue3127 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkdir $CHEZMOISOURCEDIR # test that chezmoi --config=path init --config-path=path writes the initial config into path (0.858s) > cp golden/config1.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi --config=$HOME/config/athome.toml init --config-path=$HOME/config/athome.toml > cmp $HOME/config/athome.toml golden/config1.toml # test that chezmoi --config=path init --config-path=path writes an updated config into path (0.897s) > cp golden/config2.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi --config=$HOME/config/athome.toml init --config-path=$HOME/config/athome.toml > cmp $HOME/config/athome.toml golden/config2.toml # test that chezmoi --config=path init writes an updated config into path (1.026s) > cp golden/config3.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi --config=$HOME/config/athome.toml init > cmp $HOME/config/athome.toml golden/config3.toml PASS === NAME TestScript/issue2977 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi source-path returns an error for file to be removed from exact directories (1.418s) > mkdir $HOME/.dir > mkfile $HOME/.dir/test.file > ! exec chezmoi source-path $HOME/.dir/test.file [stderr] chezmoi: $WORK/home/user/.dir/test.file: not in source state [exit status 1] > stderr 'not in source state' PASS === NAME TestScript/applysourcepath testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test that chezmoi apply --source-path only applies the target (1.722s) > exec chezmoi apply --source-path $CHEZMOISOURCEDIR/dot_file > ! exists $HOME/.empty > exists $HOME/.file > exec chezmoi apply --source-path $CHEZMOISOURCEDIR/empty_dot_empty > exists $HOME/.empty # test that chezmoi apply --source-path ignores other modified files (1.906s) > edit $HOME/.file > exec chezmoi status [stdout] A .create A .dir A .dir/file A .dir/subdir A .dir/subdir/file A .executable MM .file A .private A .readonly A .symlink A .template > stdout 'MM \.file' > exec chezmoi apply --source-path $CHEZMOISOURCEDIR/executable_dot_executable > exists $HOME/.executable PASS === NAME TestScript/issue2132 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply does not create a remove_ directory if it has no contents (0.601s) > exec chezmoi apply > ! exists $HOME/.dir # test that running chezmoi apply a second time completes with no output (0.734s) > exec chezmoi apply --no-tty > ! stdout . > ! exists $HOME/.dir PASS === NAME TestScript/issue2302 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi does not panic if an external uses an absolute path (1.524s) > ! exec chezmoi diff [stderr] chezmoi: $WORK/home/user/.local/share/chezmoi/.chezmoiexternal.toml: /home/user/.dir: path is not relative [exit status 1] > stderr 'path is not relative' PASS === NAME TestScript/purge testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test that chezmoi purge purges the source dir (3.223s) > exists $CHEZMOISOURCEDIR > exec chezmoi purge --force > ! exists $CHEZMOISOURCEDIR > chhome home2/user # test that chezmoi purge purges the config dir (1.301s) > exists $CHEZMOICONFIGDIR > exec chezmoi purge --force > ! exists $CHEZMOICONFIGDIR # test that chezmoi purge purges the cache dir (0.655s) > mkdir $HOME/.cache/chezmoi > exec chezmoi purge --force > ! exists $HOME/.cache/chezmoi PASS === NAME TestScript/templatedata testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that .chezmoi.sourceDir can be used with joinPath (0.255s) > [unix] exec chezmoi execute-template '{{ joinPath .chezmoi.sourceDir ".file" }}' [stdout] $WORK/home/user/.local/share/chezmoi/.file> [unix] stdout ${CHEZMOISOURCEDIR@R}/.file # test that .chezmoi.sourceFile is set (1.186s) > exec chezmoi cat $HOME${/}.file [stdout] dot_file.tmpl > stdout dot_file.tmpl # test that .chezmoi.kernel is set on linux (0.862s) > [linux] exec chezmoi execute-template '{{ .chezmoi.kernel.ostype }}' [stdout] Linux> [linux] stdout Linux > chhome home2/user # test that .chezmoidata. and .chezmoitemplates are available in .chezmoiignore (0.855s) > exec chezmoi apply > exists $HOME/.file1 > ! exists $HOME/.file2 > chhome home3/user # test that data execute-template ignores template errors (0.688s) > exec chezmoi data [stdout] { "chezmoi": { "arch": "riscv64", "args": [ "chezmoi", "data" ], "cacheDir": "$WORK/home3/user/.cache/chezmoi", "command": "data", "commandDir": "$WORK", "config": { "add": { "encrypt": false, "secrets": "warning", "templateSymlinks": false }, "age": { "args": null, "command": "age", "identities": null, "identity": {}, "passphrase": false, "recipient": "", "recipients": null, "recipientsFile": {}, "recipientsFiles": null, "suffix": ".age", "symmetric": false, "useBuiltin": false }, "awsSecretsManager": { "profile": "", "region": "" }, "azureKeyVault": { "defaultVault": "" }, "bitwarden": { "command": "bw" }, "bitwardenSecrets": { "command": "bws" }, "cacheDir": {}, "cd": { "args": null, "command": "" }, "color": {}, "completion": { "custom": false }, "dashlane": { "args": null, "command": "dcli" }, "data": {}, "destDir": {}, "diff": { "args": null, "command": "", "exclude": [], "pager": "\u0000", "reverse": false, "scriptContents": true }, "doppler": { "args": null, "command": "doppler", "config": "", "project": "" }, "edit": { "apply": false, "args": null, "command": "", "hardlink": true, "minDuration": 1000000000, "watch": false }, "ejson": { "key": "", "keyDir": "/opt/ejson/keys" }, "encryption": "", "env": null, "format": "json", "git": { "autoadd": false, "autocommit": false, "autopush": false, "command": "git", "commitMessageTemplate": "", "commitMessageTemplateFile": "" }, "gitHub": { "refreshPeriod": 60000000000 }, "gopass": { "command": "gopass" }, "gpg": { "args": null, "command": "gpg", "recipient": "", "recipients": null, "suffix": ".asc", "symmetric": false }, "hcpVaultSecrets": { "applicationName": "", "args": null, "command": "vlt", "organizationId": "", "projectId": "" }, "hooks": null, "interpreters": {}, "keepassxc": { "args": null, "command": "keepassxc-cli", "database": {}, "mode": "cache-password", "prompt": true }, "keeper": { "args": null, "command": "keeper" }, "lastpass": { "command": "lpass" }, "merge": { "args": null, "command": "vimdiff" }, "mode": "", "onepassword": { "command": "op", "prompt": true }, "pager": "", "pass": { "command": "pass" }, "passhole": { "args": null, "command": "ph", "prompt": true }, "persistentState": {}, "pinentry": { "args": null, "command": "", "options": [ "allow-external-password-cache" ] }, "progress": {}, "rbw": { "command": "rbw" }, "safe": true, "scriptEnv": null, "scriptTempDir": {}, "secret": { "args": null, "command": "" }, "sourceDir": {}, "status": { "exclude": [], "pathStyle": "relative" }, "template": { "options": [ "missingkey=error" ] }, "textConv": null, "umask": 18, "update": { "apply": true, "args": null, "command": "", "recurseSubmodules": true }, "useBuiltinAge": {}, "useBuiltinGit": {}, "vault": { "command": "vault" }, "verbose": false, "verify": { "exclude": [] }, "warnings": { "configFileTemplateHasChanged": true }, "workingTree": {} }, "configFile": "$WORK/home3/user/.config/chezmoi/chezmoi.toml", "executable": "/tmp/testscript-main3957720979/bin/chezmoi", "fqdnHostname": "arch-nspawn-498843", "gid": "1001", "group": "builduser", "homeDir": "$WORK/home3/user", "hostname": "arch-nspawn-498843", "kernel": { "osrelease": "6.1.61-3-sophgo-multi-08357-g369f7207fe69", "ostype": "Linux", "version": "#1 SMP Sat, 30 Dec 2023 06:54:24 +0000" }, "os": "linux", "osRelease": { "ansiColor": "38;2;23;147;209", "bugReportURL": "https://gitlab.archlinux.org/groups/archlinux/-/issues", "buildID": "rolling", "documentationURL": "https://wiki.archlinux.org/", "homeURL": "https://archlinux.org/", "id": "arch", "logo": "archlinux-logo", "name": "Arch Linux", "prettyName": "Arch Linux", "privacyPolicyURL": "https://terms.archlinux.org/docs/privacy-policy/", "supportURL": "https://bbs.archlinux.org/" }, "pathListSeparator": ":", "pathSeparator": "/", "sourceDir": "$WORK/home3/user/.local/share/chezmoi", "uid": "1001", "username": "builduser", "version": { "builtBy": "testscript", "commit": "HEAD", "date": "2024-02-12T14:22:32Z", "version": "v2.0.0+test" }, "windowsVersion": {}, "workingTree": "$WORK/home3/user/.local/share/chezmoi" }, "message": "ok" } > stdout ok # test that chezmoi execute-template ignores template errors (0.797s) > exec chezmoi execute-template '{{ template "template" . }}' [stdout] ok > stdout ok > [unix] chhome home4/user # test that .chezmoi.sourceFile is set (0.877s) > [unix] exec chezmoi cat $HOME${/}.file [stdout] dot_file.tmpl $WORK/home4/user/.file > [unix] cmpenv stdout golden/dot_file PASS === NAME TestScript/editconfig testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that edit-config creates a config file if needed (1.130s) > exec chezmoi edit-config [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home/user/.config/chezmoi/chezmoi.toml: returned in less than 1s > grep -count=1 '# edited' $CHEZMOICONFIGDIR/chezmoi.toml # test that edit-config edits an existing config file (0.947s) > exec chezmoi edit-config [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home/user/.config/chezmoi/chezmoi.toml: returned in less than 1s > grep -count=2 '# edited' $CHEZMOICONFIGDIR/chezmoi.toml > chhome home2/user # test that edit-config edits an existing YAML config file (0.781s) > exec chezmoi edit-config > grep -count=1 '# edited' $CHEZMOICONFIGDIR/chezmoi.yaml > ! stderr warning > chhome home3/user # test that edit-config reports a warning if the config is no longer valid (0.710s) > exec chezmoi edit-config [stderr] chezmoi: warning: $WORK/home3/user/.config/chezmoi/chezmoi.json: expected EOF > stderr warning > ! stderr 'returned in less than' > grep -count=1 '# edited' $CHEZMOICONFIGDIR/chezmoi.json PASS === NAME TestScript/issue2177 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi forget prints a warning when asked to forget externals (1.225s) > exec chezmoi forget $HOME${/}.external [stderr] chezmoi: warning: .external: cannot forget entry from external https://github.com/user/repo.git defined in $WORK/home/user/.local/share/chezmoi/.chezmoiexternal.toml > stderr 'cannot forget entry from external https://github\.com/user/repo\.git defined in .*/home/user/\.local/share/chezmoi/\.chezmoiexternal\.toml' PASS === NAME TestScript/addautotemplate testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi add --autotemplate on a file with a replacement creates a template in the source directory (1.331s) > exec chezmoi add --autotemplate $HOME${/}.template > cmp $CHEZMOISOURCEDIR/dot_template.tmpl golden/dot_template.tmpl # test that chezmoi add --autotemplate on a symlink with a replacement creates a template in the source directory (0.605s) > symlink $HOME/.symlink -> .target-value > exec chezmoi add --autotemplate $HOME${/}.symlink > cmp $CHEZMOISOURCEDIR/symlink_dot_symlink.tmpl golden/symlink_dot_symlink.tmpl # test that chezmoi add --autotemplate does not create a template if no replacements occurred (0.981s) > exec chezmoi add --autotemplate $HOME${/}.file > cmp $CHEZMOISOURCEDIR/dot_file golden/dot_file # test that chezmoi add --autotemplate escapes brackets (0.924s) > exec chezmoi add --autotemplate $HOME${/}.vimrc > cmp $CHEZMOISOURCEDIR/dot_vimrc.tmpl golden/dot_vimrc.tmpl PASS === NAME TestScript/issue1237 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi add does not add ignored directories (1.918s) > exec chezmoi add ~/.config [stderr] chezmoi: warning: ignoring .config/Bitwarden CLI chezmoi: warning: ignoring .config/Bitwarden CLI/file > exec chezmoi managed [stdout] .config > cmp stdout golden/managed > exists $CHEZMOISOURCEDIR/dot_config/.keep PASS === NAME TestScript/issue3268 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/chezmoi-test-command # test that chezmoi sets CHEZMOI_ environment variables (3.266s) > exec chezmoi execute-template '{{ output "chezmoi-test-command" }}' [stdout] CHEZMOI_SOURCE_DIR=$WORK/home/user/.local/share/chezmoi > stdout 'CHEZMOI_SOURCE_DIR=.*/\.local/share/chezmoi\s?$' > chhome home2/user # test that chezmoi sets environment variables from env (1.138s) > exec chezmoi execute-template '{{ env "VAR" }}' [stdout] VALUE> stdout VALUE > chhome home3/user # test that env and scriptEnv cannot both be set (1.287s) > ! exec chezmoi execute-template '' [stderr] chezmoi: only one of env or scriptEnv may be set [exit status 1] > stderr 'only one of env or scriptEnv may be set' PASS === NAME TestScript/scriptsdir_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi apply runs scripts in .chezmoiscripts (1.988s) > exec chezmoi apply [stdout] script script in subdir > cmp stdout golden/apply > chhome home2/user # test that chezmoi apply fails if .chezmoiscripts contains a non-script (1.715s) > ! exec chezmoi apply [stderr] chezmoi: $WORK/home2/user/.local/share/chezmoi/.chezmoiscripts/dot_file: not a script [exit status 1] > stderr 'not a script' > chhome home3/user # test that chezmoi apply fails if .chezmoiscripts contains duplicate targets (0.831s) > ! exec chezmoi apply [stderr] chezmoi: .chezmoiscripts/script.sh: inconsistent state ($WORK/home3/user/.local/share/chezmoi/.chezmoiscripts/run_once_script.sh, $WORK/home3/user/.local/share/chezmoi/.chezmoiscripts/run_script.sh) [exit status 1] > stderr 'inconsistent state' > chhome home4/user # test that chezmoi apply fails if .chezmoiscripts contains any .chezmoi* files (1.184s) > ! exec chezmoi apply [stderr] chezmoi: $WORK/home4/user/.local/share/chezmoi/.chezmoiscripts/.chezmoiignore: not allowed in .chezmoiscripts directory [exit status 1] > stderr 'not allowed in \.chezmoiscripts directory' PASS === NAME TestScript/issue2380 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi source-path with no arguments respects .chezmoiroot (1.062s) > exec chezmoi source-path [stdout] $WORK/home/user/.local/share/chezmoi/home > stdout ${CHEZMOISOURCEDIR@R}/home PASS === NAME TestScript/externaldiff testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi diff invokes the external diff command for scripts (0.309s) > exec chezmoi diff [stdout] # contents of script > stdout '# contents of script' # test that chezmoi diff excludes scripts if configured (3.237s) > appendline ${CHEZMOICONFIGDIR}/chezmoi.toml ' exclude = ["scripts"]' > exec chezmoi diff > ! stdout '# contents of script' > chhome home2/user # test that chezmoi diff does not pass non-existent filenames to external diff command (0.977s) > exec chezmoi diff [stdout] # contents of .file > chhome home3/user # test that chezmoi diff passes /dev/null and directory names when creating directories (1.265s) > exec chezmoi diff [stdout] /dev/null $WORK/.tmp/chezmoi-diff3071198040/.dir > stdout ^/dev/null\s${WORK@R}/.*/\.dir$ PASS === NAME TestScript/issue2573 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 bin/diff # test that chezmoi apply --verbose with an external diff command and dirs excluded does not run the diff command when a directory is removed (1.749s) > exec chezmoi apply --verbose > ! stdout diff PASS === NAME TestScript/importxz testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [(openbsd||windows)] skip 'tar does not support XZ compression' > [!exec:xz] skip 'xz not found in $PATH' > exec tar cJf archive.tar.xz archive # test that chezmoi import imports a tar.xz archive (1.071s) > exec chezmoi import --destination=$HOME${/}.dir --strip-components=1 archive.tar.xz > cmp $CHEZMOISOURCEDIR/dot_dir/dir/file golden/dot_dir/dir/file PASS === NAME TestScript/issue2500 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/git > [windows] skip 'UNIX only' # test that the error message returned when git fails to update an external includes the target path (1.289s) > exec chezmoi apply [stdout] clone ok > ! exec chezmoi apply --force --refresh-externals [stdout] unknown command pull [stderr] chezmoi: $WORK/home/user/.dir: exit status 1 [exit status 1] > stderr ${HOME@R}/\.dir:\x20exit\x20status\x201 PASS === NAME TestScript/issue2820 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi add refuses to add files in chezmoi's source directory (1.093s) > ! exec chezmoi add $CHEZMOISOURCEDIR [stderr] chezmoi: $WORK/home/user/.local/share/chezmoi: cannot add chezmoi file to chezmoi ($WORK/home/user/.local/share/chezmoi is protected) [exit status 1] > stderr 'cannot add chezmoi file to chezmoi' # test that chezmoi add refuses to add files in chezmoi's config directory (1.112s) > ! exec chezmoi add $CHEZMOICONFIGDIR [stderr] chezmoi: $WORK/home/user/.config/chezmoi/chezmoi.toml: cannot add chezmoi file to chezmoi ($WORK/home/user/.config/chezmoi/chezmoi.toml is protected) [exit status 1] > stderr 'cannot add chezmoi file to chezmoi' # test that chezmoi add refuses to add files in chezmoi's source directory when already in that directory (0.599s) > cd $CHEZMOISOURCEDIR $WORK/home/user/.local/share/chezmoi > exists dot_file > ! exec chezmoi add dot_file [stderr] chezmoi: $WORK/home/user/.local/share/chezmoi: cannot add chezmoi file to chezmoi ($WORK/home/user/.local/share/chezmoi is protected) [exit status 1] > stderr 'cannot add chezmoi file to chezmoi' PASS === NAME TestScript/importtarzst testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [(openbsd||windows)] skip 'tar does not support zstd compression' > [!exec:zstd] skip 'zstd not found in $PATH' > exec tar -c -f archive.tar.zst --use-compress-program zstd archive # test that chezmoi import imports a tar.zst archive (0.914s) > exec chezmoi import --destination=$HOME${/}.dir --strip-components=1 archive.tar.zst > cmp $CHEZMOISOURCEDIR/dot_dir/dir/file golden/dot_dir/dir/file PASS === NAME TestScript/issue2016 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > symlink $HOME/.symlink -> .file # test that chezmoi apply removes broken symlinks (1.479s) > exec chezmoi apply > ! lexists $HOME/.symlink PASS === NAME TestScript/importzip testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:zip] skip 'zip not found in $PATH' > exec zip -r archive.zip archive [stdout] adding: archive/ (stored 0%) adding: archive/dir/ (stored 0%) adding: archive/dir/file (stored 0%) # test that chezmoi import imports a zip archive (1.112s) > exec chezmoi import --destination=$HOME${/}.dir --strip-components=1 archive.zip > cmp $CHEZMOISOURCEDIR/dot_dir/dir/file golden/dot_dir/dir/file PASS === NAME TestScript/exclude testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!umask:022] skip # test chezmoi diff --exclude (0.811s) > exec chezmoi diff --exclude=scripts [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file > [unix] cmp stdout golden/diff-no-scripts.diff > [windows] cmp stdout golden/diff-no-scripts-windows.diff # test that chezmoi diff respects the diff.exclude configuration variable (1.983s) > exec chezmoi diff [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file diff --git a/script.sh b/script.sh new file mode 100755 index 0000000000000000000000000000000000000000..3747a7ba08ee591c41b7c518e430d2802137eac4 --- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo $* > [unix] cmp stdout golden/diff.diff > [windows] cmp stdout golden/diff-windows.diff > mkdir $CHEZMOICONFIGDIR > cp golden/chezmoi.toml $CHEZMOICONFIGDIR > exec chezmoi diff [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file > [unix] cmp stdout golden/diff-no-scripts.diff > [windows] cmp stdout golden/diff-no-scripts-windows.diff > chhome home2/user # test that chezmoi diff --exclude=always excludes scripts that are always run (0.635s) > exec chezmoi diff --exclude=always [stdout] diff --git a/script-once.sh b/script-once.sh new file mode 100755 index 0000000000000000000000000000000000000000..d7dff6100cefc930f4161600c12b6f7ea37b7d3a --- /dev/null +++ b/script-once.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo once > cmp stdout golden/diff-exclude-always.diff PASS === NAME TestScript/scriptperl testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:perl] skip 'perl not found in $PATH' > exec chezmoi apply [stdout] Hello from Perl > stdout 'Hello from Perl' PASS === NAME TestScript/applytype testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir golden > mkhomedir > mksourcedir # test that chezmoi apply replaces a directory with a file (1.232s) > rm $HOME/.file > mkdir $HOME/.file > exec chezmoi apply --force > cmp $HOME/.file golden/.file # test that chezmoi apply replaces a file with a directory (1.061s) > rm $HOME/.dir > mkfile $HOME/.dir > exec chezmoi apply --force > cmp $HOME/.dir/file golden/.dir/file > cmp $HOME/.dir/subdir/file golden/.dir/subdir/file # test that chezmoi apply replaces a file with a symlink (0.811s) > rm $HOME/.symlink > mkfile $HOME/.symlink > exec chezmoi apply --force > cmp $HOME/.symlink golden/.symlink # test that chezmoi apply replaces a symlink with a directory (0.944s) > rm $HOME/.dir/subdir > symlink $HOME/.dir/subdir -> .file > exec chezmoi apply --force > cmp $HOME/.dir/file golden/.dir/file > cmp $HOME/.dir/subdir/file golden/.dir/subdir/file PASS === NAME TestScript/merge_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > mkhomedir > mksourcedir # test that chezmoi merge does a three-way merge (1.102s) > exec chezmoi merge $HOME${/}.file [stdout] $WORK/home/user/.file $WORK/home/user/.local/share/chezmoi/dot_file $WORK/.tmp/chezmoi-merge679212120/.file > stdout ^${HOME@R}/\.file\s+${CHEZMOISOURCEDIR@R}/dot_file\s+${WORK@R}/.*/\.file$ # test that chezmoi merge falls back to a two-way merge when the template is invalid # FIXME the following test fails # chezmoi merge $HOME${/}.invalid_template # stdout ^${HOME@R}/\.invalid_template\s+$CHEZMOISOURCEDIR/dot_invalid_template\.tmpl$ (0.000s) > chhome home2/user # test that chezmoi merge does a three-way merge with the arguments in the configured order (0.780s) > exec chezmoi merge $HOME${/}.file [stdout] $WORK/home2/user/.local/share/chezmoi/dot_file $WORK/home2/user/.file $WORK/.tmp/chezmoi-merge3520926076/.file > stdout ^${CHEZMOISOURCEDIR@R}/dot_file\s+${HOME@R}/\.file\s+${WORK@R}/.*/\.file$ > chhome home3/user # test that chezmoi merge appends the destination, source, and target paths if merge.args does not contain any templates (0.755s) > exec chezmoi merge $HOME${/}.file [stdout] arg $WORK/home3/user/.file $WORK/home3/user/.local/share/chezmoi/dot_file $WORK/.tmp/chezmoi-merge2270626903/.file > stdout ^arg\s+${HOME@R}/\.file\s+${CHEZMOISOURCEDIR@R}/dot_file\s+${WORK@R}/.*/\.file$ > chhome home4/user # test that chezmoi merge respects .chezmoiroot (0.924s) > exec chezmoi merge $HOME${/}.file [stdout] $WORK/home4/user/.file $WORK/home4/user/.local/share/chezmoi/home/dot_file $WORK/.tmp/chezmoi-merge3492949174/.file > stdout ^${HOME@R}/\.file\s+${CHEZMOISOURCEDIR@R}/home/dot_file\s+${WORK@R}/.*/\.file$ PASS === NAME TestScript/externalencrypted testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'skipping gpg tests on Windows' > [!exec:gpg] skip 'gpg not found in $PATH' > mkgpgconfig # use chezmoi's encryption to encrypt a file and an archive (2.183s) > exec tar czf $HOME/archive.tar.gz archive > exec chezmoi add --encrypt $HOME${/}.file $HOME${/}archive.tar.gz [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 gpg: Warning: using insecure memory! > mkdir www > cp $CHEZMOISOURCEDIR/encrypted_dot_file.asc www/.file.asc > cp $CHEZMOISOURCEDIR/encrypted_archive.tar.gz.asc www/archive.tar.gz.asc > httpd www > chhome home2/user # test that chezmoi reads encrypted external files and archives (2.187s) > mkdir $CHEZMOICONFIGDIR > cp home/user/.config/chezmoi/chezmoi.toml $CHEZMOICONFIGDIR > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 9DA72A495E30B244, created 2024-02-12 "chezmoi-test-gpg-key" gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 9DA72A495E30B244, created 2024-02-12 "chezmoi-test-gpg-key" > cmp $HOME/.file golden/.file > cmp $HOME/.dir/file golden/dir/file PASS === NAME TestScript/issue2937 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that .chezmoiignore prevents git-repo externals from being downloaded (0.691s) > exec chezmoi apply > ! exists .dir > chhome home2/user # test that .chezmoiignore prevents external archives from being downloaded (0.833s) > exec chezmoi apply > ! exists .dir PASS === NAME TestScript/root testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply uses .chezmoiroot (2.539s) > exec chezmoi apply > cmp $HOME/.file golden/.file # test that chezmoi add uses .chezmoiroot (1.030s) > symlink $HOME/.symlink -> .file > exec chezmoi add $HOME${/}.symlink > cmp $CHEZMOISOURCEDIR/home/symlink_dot_symlink golden/symlink_dot_symlink > [!exec:git] skip 'git not found in $PATH' > [windows] skip 'go-git does not support file:// URLs on windows' > chhome home2/user > mkgitconfig # create a git repo in home2/user/repo (0.427s) > exec git -C $HOME/repo init [stdout] Initialized empty Git repository in $WORK/home2/user/repo/.git/ > exec git -C $HOME/repo add . > exec git -C $HOME/repo commit -m 'Initial commit' [stdout] [master (root-commit) 4ab6a1a] Initial commit 3 files changed, 2 insertions(+) create mode 100644 .chezmoiroot create mode 100644 home/.chezmoi.toml.tmpl create mode 100644 home/dot_file # test that chezmoi init uses .chezmoiroot (2.204s) > exec chezmoi init --apply file://$HOME/repo [stderr] Cloning into '$WORK/home2/user/.local/share/chezmoi'... > exists $CHEZMOICONFIGDIR/chezmoi.toml > cmp $HOME/.file golden/.file PASS === NAME TestScript/issue3325 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that integer types are preserved in fromJson | toToml template function pipelines (2.786s) > exec chezmoi execute-template '{{ "{\"key\":1}" | fromJson | toToml }}' [stdout] key = 1 > cmp stdout golden/stdout # test that integer types are preserved in the .data section of JSONC config files (1.183s) > exec chezmoi execute-template '{{ .data | toToml }}' [stdout] dataFloat64 = 1.1 dataInt64 = 2 > cmp stdout golden/config.toml # test that integer and floating point types are preserved from .chezmoidata.json files (0.669s) > exec chezmoi execute-template '{{ .json | toToml }}' [stdout] jsonFloat64 = 3.3 jsonInt64 = 4 > cmp stdout golden/json.toml # test that integer and floating point types are preserved from .chezmoidata.jsonc files (1.274s) > exec chezmoi execute-template '{{ .jsonc | toToml }}' [stdout] jsoncFloat64 = 5.5 jsoncInt64 = 6 > cmp stdout golden/jsonc.toml PASS === NAME TestScript/scriptsubdir_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!umask:022] skip # test that scripts in subdirectories are run in the subdirectory (3.903s) > exec chezmoi apply --force [stdout] $WORK/home/user $WORK/home/user/dir $WORK/home/user/anotherdir > cmpenv stdout golden/apply > exec chezmoi dump [stdout] { "anotherdir": { "type": "dir", "name": "anotherdir", "perm": 493 }, "anotherdir/script.sh": { "type": "script", "name": "anotherdir/script.sh", "contents": "#!/bin/sh\n\npwd\n", "condition": "always" }, "dir": { "type": "dir", "name": "dir", "perm": 493 }, "dir/script.sh": { "type": "script", "name": "dir/script.sh", "contents": "#!/bin/sh\n\npwd\n", "condition": "always" }, "otherdir": { "type": "dir", "name": "otherdir", "perm": 493 }, "otherdir/script.sh": { "type": "script", "name": "otherdir/script.sh", "contents": "#!/bin/sh\n\npwd\n", "condition": "always" } } > cmp stdout golden/dump.json > exec chezmoi archive --gzip --output=archive.tar.gz > exec tar -tzf archive.tar.gz [stdout] otherdir/script.sh anotherdir/ dir/ dir/script.sh otherdir/ anotherdir/script.sh > [!openbsd] cmp stdout golden/archive > [openbsd] cmp stdout golden/archive-openbsd PASS === NAME TestScript/issue3415 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply does not remove remove_ directories if they are not empty (2.450s) > exec chezmoi apply > exists $HOME/.dir/file # test that chezmoi apply does remove remove_ directories if they are empty (2.237s) > rm $HOME/.dir/file > exec chezmoi apply > ! exists $HOME/.dir > chhome home2/user # test that chezmoi apply does not remove remove_ directories if they are not empty, recursively (0.777s) > exec chezmoi apply > exists $HOME/.dir/subdir/file # test that chezmoi apply does remove remove_ directories if they are empty, recursively (0.747s) > rm $HOME/.dir/subdir/file > exec chezmoi apply > ! exists $HOME/.dir PASS === NAME TestScript/editconfigtemplate testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip # FIXME make this test pass on Windows # test that chezmoi edit-config-template creates a new config file template (1.338s) > exec chezmoi edit-config-template [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home/user/.local/share/chezmoi/.chezmoi.toml.tmpl: returned in less than 1s > cmp $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl golden/edited > chhome home2/user # test that chezmoi edit-config-template creates a new config file template in .chezmoiroot (1.199s) > exec chezmoi edit-config-template [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home2/user/.local/share/chezmoi/home/.chezmoi.toml.tmpl: returned in less than 1s > cmp $CHEZMOISOURCEDIR/home/.chezmoi.toml.tmpl golden/edited > chhome home3/user # test that chezmoi edit-config-template creates a new config file template from an existing config file (1.273s) > exec chezmoi edit-config-template [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home3/user/.local/share/chezmoi/.chezmoi.yaml.tmpl: returned in less than 1s > cmp $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl golden/edited-chezmoi.yaml > chhome home4/user # test that chezmoi edit-config-template edits an existing config file template (0.951s) > exec chezmoi edit-config-template [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home4/user/.local/share/chezmoi/home/.chezmoi.yaml.tmpl: returned in less than 1s > cmp $CHEZMOISOURCEDIR/home/.chezmoi.yaml.tmpl golden/edited-chezmoi.yaml PASS === NAME TestScript/issue3113 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 777 bin/custom-pager > chmod 777 bin/default-pager # test that chezmoi diff uses the default pager by default (1.146s) > exec chezmoi diff [stdout] default-pager > stdout default-pager > chhome home2/user # test that setting diff.pager to a custom pager uses that pager (1.441s) > exec chezmoi diff [stdout] custom-pager > stdout custom-pager > chhome home3/user # test that setting diff.pager to the empty string disables the pager (0.978s) > exec chezmoi diff [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file > stdout diff PASS === NAME TestScript/issue1869 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test concurrent read when there are multiple .chezmoiignore files (1.196s) > exec chezmoi status [stdout] A dir1 A dir1/subdir1 A dir1/subdir2 A dir1/subdir3 A dir2 A dir2/subdir1 A dir2/subdir2 A dir2/subdir3 A dir3 A dir3/subdir1 A dir3/subdir2 A dir3/subdir3 > chhome home2/user # test concurrent read when there are multitple .chezmoidata. files (0.985s) > exec chezmoi data [stdout] { "chezmoi": { "arch": "riscv64", "args": [ "chezmoi", "data" ], "cacheDir": "$WORK/home2/user/.cache/chezmoi", "command": "data", "commandDir": "$WORK", "config": { "add": { "encrypt": false, "secrets": "warning", "templateSymlinks": false }, "age": { "args": null, "command": "age", "identities": null, "identity": {}, "passphrase": false, "recipient": "", "recipients": null, "recipientsFile": {}, "recipientsFiles": null, "suffix": ".age", "symmetric": false, "useBuiltin": false }, "awsSecretsManager": { "profile": "", "region": "" }, "azureKeyVault": { "defaultVault": "" }, "bitwarden": { "command": "bw" }, "bitwardenSecrets": { "command": "bws" }, "cacheDir": {}, "cd": { "args": null, "command": "" }, "color": {}, "completion": { "custom": false }, "dashlane": { "args": null, "command": "dcli" }, "data": {}, "destDir": {}, "diff": { "args": null, "command": "", "exclude": [], "pager": "\u0000", "reverse": false, "scriptContents": true }, "doppler": { "args": null, "command": "doppler", "config": "", "project": "" }, "edit": { "apply": false, "args": null, "command": "", "hardlink": true, "minDuration": 1000000000, "watch": false }, "ejson": { "key": "", "keyDir": "/opt/ejson/keys" }, "encryption": "", "env": null, "format": "json", "git": { "autoadd": false, "autocommit": false, "autopush": false, "command": "git", "commitMessageTemplate": "", "commitMessageTemplateFile": "" }, "gitHub": { "refreshPeriod": 60000000000 }, "gopass": { "command": "gopass" }, "gpg": { "args": null, "command": "gpg", "recipient": "", "recipients": null, "suffix": ".asc", "symmetric": false }, "hcpVaultSecrets": { "applicationName": "", "args": null, "command": "vlt", "organizationId": "", "projectId": "" }, "hooks": null, "interpreters": {}, "keepassxc": { "args": null, "command": "keepassxc-cli", "database": {}, "mode": "cache-password", "prompt": true }, "keeper": { "args": null, "command": "keeper" }, "lastpass": { "command": "lpass" }, "merge": { "args": null, "command": "vimdiff" }, "mode": "", "onepassword": { "command": "op", "prompt": true }, "pager": "", "pass": { "command": "pass" }, "passhole": { "args": null, "command": "ph", "prompt": true }, "persistentState": {}, "pinentry": { "args": null, "command": "", "options": [ "allow-external-password-cache" ] }, "progress": {}, "rbw": { "command": "rbw" }, "safe": true, "scriptEnv": null, "scriptTempDir": {}, "secret": { "args": null, "command": "" }, "sourceDir": {}, "status": { "exclude": [], "pathStyle": "relative" }, "template": { "options": [ "missingkey=error" ] }, "textConv": null, "umask": 18, "update": { "apply": true, "args": null, "command": "", "recurseSubmodules": true }, "useBuiltinAge": {}, "useBuiltinGit": {}, "vault": { "command": "vault" }, "verbose": false, "verify": { "exclude": [] }, "warnings": { "configFileTemplateHasChanged": true }, "workingTree": {} }, "configFile": "$WORK/home2/user/.config/chezmoi/chezmoi.toml", "executable": "/tmp/testscript-main3957720979/bin/chezmoi", "fqdnHostname": "arch-nspawn-498843", "gid": "1001", "group": "builduser", "homeDir": "$WORK/home2/user", "hostname": "arch-nspawn-498843", "kernel": { "osrelease": "6.1.61-3-sophgo-multi-08357-g369f7207fe69", "ostype": "Linux", "version": "#1 SMP Sat, 30 Dec 2023 06:54:24 +0000" }, "os": "linux", "osRelease": { "ansiColor": "38;2;23;147;209", "bugReportURL": "https://gitlab.archlinux.org/groups/archlinux/-/issues", "buildID": "rolling", "documentationURL": "https://wiki.archlinux.org/", "homeURL": "https://archlinux.org/", "id": "arch", "logo": "archlinux-logo", "name": "Arch Linux", "prettyName": "Arch Linux", "privacyPolicyURL": "https://terms.archlinux.org/docs/privacy-policy/", "supportURL": "https://bbs.archlinux.org/" }, "pathListSeparator": ":", "pathSeparator": "/", "sourceDir": "$WORK/home2/user/.local/share/chezmoi", "uid": "1001", "username": "builduser", "version": { "builtBy": "testscript", "commit": "HEAD", "date": "2024-02-12T14:22:35Z", "version": "v2.0.0+test" }, "windowsVersion": {}, "workingTree": "$WORK/home2/user/.local/share/chezmoi" }, "key": "value" } PASS === NAME TestScript/issue2934 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi sets environment variables for modify_ scripts (1.263s) > exec chezmoi apply $HOME${/}.modify > grep ^CHEZMOI_SOURCE_DIR=${CHEZMOISOURCEDIR@R}$ $HOME/.modify > grep ^CHEZMOI_SOURCE_FILE=modify_dot_modify$ $HOME/.modify > chhome home2/user # test that CHEZMOI_SOURCE_FILE environment variable is set when running scripts (0.917s) > exec chezmoi apply $HOME${/}script.sh [stdout] CHEZMOI_SOURCE_DIR=$WORK/home2/user/.local/share/chezmoi CHEZMOI_SOURCE_FILE=run_script.sh > stdout ^CHEZMOI_SOURCE_DIR=${CHEZMOISOURCEDIR@R}$ > stdout ^CHEZMOI_SOURCE_FILE=run_script.sh$ PASS === NAME TestScript/issue1365 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi diff generates the correct output when chezmoi's config file is managed by chezmoi (0.838s) > chmod 700 $CHEZMOICONFIGDIR > chmod 600 $CHEZMOICONFIGDIR/chezmoi.toml > exec chezmoi diff [stdout] diff --git a/.config/chezmoi/chezmoi.toml b/.config/chezmoi/chezmoi.toml index 63caeb2522e9320690143749a6aee71e8fddd300..b9495f6120fb36c4cbda33cb72700c80f1ebb979 100600 --- a/.config/chezmoi/chezmoi.toml +++ b/.config/chezmoi/chezmoi.toml @@ -1 +1 @@ -# dest contents of chezmoi.toml +# target contents of chezmoi.toml > cmp stdout golden/chezmoi.toml-diff.diff # test that chezmoi diff generates the correct output when a custom diff tool is set and the file is in a subdirectory (1.241s) > cp golden/chezmoi.toml-custom-diff $CHEZMOICONFIGDIR/chezmoi.toml > exec chezmoi diff [stdout] $WORK/home/user/.config/chezmoi/chezmoi.toml $WORK/.tmp/chezmoi-diff3277348306/.config/chezmoi/chezmoi.toml > stdout ^$HOME/\.config/chezmoi/chezmoi\.toml\s+$WORK/.*/\.config/chezmoi/chezmoi\.toml$ PASS === NAME TestScript/issue2510 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that .chezmoiignore works with scripts (1.083s) > exec chezmoi diff [stdout] diff --git a/script-one.sh b/script-one.sh new file mode 100755 index 0000000000000000000000000000000000000000..a5498fa48acd6f616d60604b94352958c5e967fc --- /dev/null +++ b/script-one.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "script one" > cmp stdout golden/diff > chhome home2/user # test that .chezmoiignore works with scripts in .chezmoiscripts (0.979s) > exec chezmoi diff [stdout] diff --git a/.chezmoiscripts/script-one.sh b/.chezmoiscripts/script-one.sh new file mode 100755 index 0000000000000000000000000000000000000000..a5498fa48acd6f616d60604b94352958c5e967fc --- /dev/null +++ b/.chezmoiscripts/script-one.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "script one" > cmp stdout golden/diff2 PASS === NAME TestScript/issue2861 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi status shows just-added-then-modified files (1.878s) > exec chezmoi add $HOME${/}.file > edit $HOME/.file > edit $CHEZMOISOURCEDIR/dot_file > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi status [stdout] MM .file > cmp stdout golden/status PASS === NAME TestScript/workingtree testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:true] skip 'true not found in $PATH' > mkhomedir # test that chezmoi cd creates the working tree if needed (1.690s) > ! exists $CHEZMOISOURCEDIR > exec chezmoi cd > exists $CHEZMOISOURCEDIR > exists $CHEZMOISOURCEDIR/home # test that chezmoi add adds a file into the source directory (1.149s) > exec chezmoi add $HOME${/}.file > cp golden/.file $CHEZMOISOURCEDIR/home/dot_file > chhome home2/user # test chezmoi init --working-tree creates the correct directory (1.279s) > exec chezmoi init --working-tree=$HOME${/}.dotfiles --source=$HOME${/}.dotfiles${/}home > exists $HOME/.dotfiles/.git > exists $HOME/.dotfiles/home > chhome home3/user # test that chezmoi add returns an error if the source directory is not in the working tree (0.909s) > mkhomedir > ! exec chezmoi add $HOME${/}.file [stderr] chezmoi: $WORK/home3/user/.local/share/chezmoi: not in $WORK/home3/user/.local/share/chezmoi/home [exit status 1] > stderr 'not in' PASS === NAME TestScript/scriptenv testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi sets environment variables for scripts (1.348s) > exec chezmoi apply [stdout] WORK=$WORK CHEZMOI_OS=linux CHEZMOI_SOURCE_DIR=$WORK/home/user/.local/share/chezmoi/home SCRIPTENV_KEY=SCRIPTENV_VALUE CHEZMOI_VERBOSE= > stdout ^WORK=${WORK@R}$ > [darwin] stdout ^CHEZMOI_OS=darwin$ > [linux] stdout ^CHEZMOI_OS=linux$ > stdout ^CHEZMOI_SOURCE_DIR=${CHEZMOISOURCEDIR@R}/home$ > stdout ^CHEZMOI_VERBOSE=$ > stdout ^SCRIPTENV_KEY=SCRIPTENV_VALUE$ # test that chezmoi passes along --verbose in scripts (0.891s) > exec chezmoi apply --verbose [stdout] diff --git a/print-variable.sh b/print-variable.sh new file mode 100755 index 0000000000000000000000000000000000000000..d3b811906e5cbcfa062c7883400385271ab3dd6b --- /dev/null +++ b/print-variable.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "WORK=${WORK}" +echo "CHEZMOI_OS=${CHEZMOI_OS}" +echo "CHEZMOI_SOURCE_DIR=${CHEZMOI_SOURCE_DIR}" +echo "SCRIPTENV_KEY=${SCRIPTENV_KEY}" +echo "CHEZMOI_VERBOSE=${CHEZMOI_VERBOSE}" WORK=$WORK CHEZMOI_OS=linux CHEZMOI_SOURCE_DIR=$WORK/home/user/.local/share/chezmoi/home SCRIPTENV_KEY=SCRIPTENV_VALUE CHEZMOI_VERBOSE=1 > stdout ^WORK=${WORK@R}$ > [darwin] stdout ^CHEZMOI_OS=darwin$ > [linux] stdout ^CHEZMOI_OS=linux$ > stdout ^CHEZMOI_SOURCE_DIR=${CHEZMOISOURCEDIR@R}/home$ > stdout ^CHEZMOI_VERBOSE=1$ > stdout ^SCRIPTENV_KEY=SCRIPTENV_VALUE$ PASS === NAME TestScript/sourcepath testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi source-path returns the source directory (2.050s) > exec chezmoi source-path [stdout] $WORK/home/user/.local/share/chezmoi > stdout ^${CHEZMOISOURCEDIR@R}$ # test that chezmoi source-path target returns the path to a target's source file (0.988s) > exec chezmoi source-path $HOME${/}.file [stdout] $WORK/home/user/.local/share/chezmoi/dot_file > stdout ^${CHEZMOISOURCEDIR@R}/dot_file$ # test that chezmoi source-path returns an error if the target is not in the source state (1.284s) > ! exec chezmoi source-path $HOME${/}.newfile [stderr] chezmoi: $WORK/home/user/.newfile: not managed [exit status 1] > stderr 'not managed' # test that chezmoi source-path returns an error if the target is not in the destination directory (1.012s) > ! exec chezmoi source-path $WORK${/}etc${/}passwd [stderr] chezmoi: $WORK/etc/passwd: not in destination directory ($WORK/home/user) [exit status 1] > stderr 'not in destination directory' > chhome home2/user # test that chezmoi source-path target returns the path the target's source file when .chezmoiroot is used (1.545s) > exec chezmoi source-path $HOME${/}.file [stdout] $WORK/home2/user/.local/share/chezmoi/home/dot_file > stdout /home/dot_file$ PASS === NAME TestScript/addsecrets testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'test requires path separator to be forward slash' # test that chezmoi add --secrets=ignore does not generate a warning when adding a file with a secret (2.327s) > exec chezmoi add --secrets=ignore $HOME${/}.secret > ! stderr . > exists $CHEZMOISOURCEDIR/dot_secret # test that chezmoi add --secrets=warning generates a warning when adding a file with a secret but still adds the file (1.734s) > rm $CHEZMOISOURCEDIR/dot_secret > exec chezmoi add --secrets=warning $HOME${/}.secret [stderr] chezmoi: $WORK/home/user/.secret:1: Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms. > cmpenv stderr golden/stderr > exists $CHEZMOISOURCEDIR/dot_secret # test that chezmoi add --secrets=error generates an error when adding a file with a secret and does not add the file (1.521s) > rm $CHEZMOISOURCEDIR/dot_secret > ! exec chezmoi add --secrets=error $HOME${/}.secret [stderr] chezmoi: $WORK/home/user/.secret:1: Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms. [exit status 1] > cmpenv stderr golden/stderr > ! exists $CHEZMOISOURCEDIR/dot_secret # test that chezmoi add --force --secrets=error generates an error when adding a file with a secret but still adds the file (1.621s) > rm $CHEZMOISOURCEDIR/dot_secret > exec chezmoi add --force --secrets=error $HOME${/}.secret [stderr] chezmoi: $WORK/home/user/.secret:1: Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms. > cmpenv stderr golden/stderr > exists $CHEZMOISOURCEDIR/dot_secret PASS === NAME TestScript/re-add testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir # test that chezmoi re-add adds all modified files (4.529s) > exec chezmoi apply --force > edit $HOME/.file > edit $HOME/.dir/file > edit $HOME/.dir/subdir/file > exec chezmoi re-add > grep '# edited' $CHEZMOISOURCEDIR/dot_file > grep '# edited' $CHEZMOISOURCEDIR/dot_dir/file > grep '# edited' $CHEZMOISOURCEDIR/dot_dir/exact_subdir/file > exec chezmoi diff > ! stdout . # test that chezmoi re-add adds only specified targets (1.047s) > edit $HOME/.file > edit $HOME/.dir/file > edit $HOME/.dir/subdir/file > exec chezmoi re-add ~/.dir/file > grep -count=1 '# edited' $CHEZMOISOURCEDIR/dot_file > grep -count=2 '# edited' $CHEZMOISOURCEDIR/dot_dir/file > grep -count=1 '# edited' $CHEZMOISOURCEDIR/dot_dir/exact_subdir/file # test that chezmoi re-add --recursive=false does not recurse into subdirectories (1.118s) > exec chezmoi re-add --recursive=false ~/.dir/subdir > grep -count=1 '# edited' $CHEZMOISOURCEDIR/dot_dir/exact_subdir/file # test that chezmoi re-add is recursive by default (0.908s) > exec chezmoi re-add ~/.dir/subdir > grep -count=2 '# edited' $CHEZMOISOURCEDIR/dot_dir/exact_subdir/file PASS === NAME TestScript/symlinks testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi apply removes a symlink if the target is empty (3.537s) > symlink $HOME/.empty -> .file > exec chezmoi apply $HOME${/}.empty > ! exists $HOME/.empty # test that chezmoi apply evaluates symlink templates (1.092s) > exec chezmoi apply $HOME${/}.template > cmp $HOME/.template $HOME/.file # test that chezmoi add --template-symlinks replaces absolute symlinks, pointing to files inside home, with templates (1.236s) > symlink $HOME/.symlink_absolute -> $HOME/.dir/subdir/file > exec chezmoi add --template-symlinks $HOME${/}.symlink_absolute > cmp $CHEZMOISOURCEDIR/symlink_dot_symlink_absolute.tmpl golden/symlink_dot_symlink_absolute.tmpl # test that chezmoi add --template-symlinks replaces absolute symlinks, pointing to files inside the source directory, with templates (0.639s) > symlink $HOME/.symlink_source -> $CHEZMOISOURCEDIR/.dir/subdir/file > exec chezmoi add --template-symlinks $HOME${/}.symlink_source > cmp $CHEZMOISOURCEDIR/symlink_dot_symlink_source.tmpl golden/symlink_dot_symlink_source.tmpl > chhome home2/user # test that chezmoi add reads add.templateSymlinks from the config file (1.045s) > symlink $HOME/.symlink_absolute -> $HOME/.dir/subdir/file > exec chezmoi add --template-symlinks $HOME${/}.symlink_absolute > cmp $CHEZMOISOURCEDIR/symlink_dot_symlink_absolute.tmpl golden/symlink_dot_symlink_absolute.tmpl PASS === NAME TestScript/ejson testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test ejsonDecrypt uses default parameters (0.882s) > ! exec chezmoi execute-template '{{ (ejsonDecrypt "golden/my-file.ejson") }}' [stderr] chezmoi: template: arg1:1:4: executing "arg1" at : error calling ejsonDecrypt: couldn't read key file (open /opt/ejson/keys/df82a403a3b58ebedd09758d3b131ff3113b39bdbfb92110940eb57832774345: no such file or directory) [exit status 1] > stderr 'couldn''t read key file' > stderr '/opt/ejson/keys/df82a403a3b58ebedd09758d3b131ff3113b39bdbfb92110940eb57832774345' # test ejsonDecrypt uses EJSON_KEYDIR when set (1.005s) > env EJSON_KEYDIR=golden/keys > exec chezmoi execute-template '{{ (ejsonDecrypt "golden/my-file.ejson").key1 }}' [stdout] value1> stdout ^value1$ # test ejsonDecrypt uses configuration's keyDir when set (1.058s) > chhome home_set_valid_keydir/user > env EJSON_KEYDIR=invalid/keys > exec chezmoi execute-template '{{ (ejsonDecrypt "golden/my-file.ejson").key2 }}' [stdout] value2> stdout ^value2$ # test ejsonDecrypt uses configuration's key when set, and succeeds if valid (0.950s) > chhome home_set_valid_key/user > exec chezmoi execute-template '{{ (ejsonDecrypt "golden/my-file.ejson").key1 }}' [stdout] value1> stdout ^value1$ # test ejsonDecrypt uses configuration's key when set, and fails if invalid (0.997s) > chhome home_set_invalid_key/user > ! exec chezmoi execute-template '{{ (ejsonDecrypt "golden/my-file.ejson") }}' [stderr] chezmoi: template: arg1:1:4: executing "arg1" at : error calling ejsonDecrypt: encoding/hex: invalid byte: U+006F 'o' [exit status 1] # test ejsonDecryptWithKey uses the key passed as parameter, and succeeds if valid (0.743s) > chhome home_set_invalid_key/user > exec chezmoi execute-template '{{ (ejsonDecryptWithKey "golden/my-file.ejson" "4fed3b88a33a4621b30230f1ad17e175e10f8587e37e84da740711c9fecfe16d").key2 }}' [stdout] value2> stdout ^value2$ # test ejsonDecryptWithKey uses the key passed as parameter, and fails if invalid (0.736s) > chhome home_set_valid_key/user > ! exec chezmoi execute-template '{{ (ejsonDecryptWithKey "golden/my-file.ejson" "invalid") }}' [stderr] chezmoi: template: arg1:1:4: executing "arg1" at : error calling ejsonDecryptWithKey: encoding/hex: invalid byte: U+0069 'i' [exit status 1] PASS === NAME TestScript/issue2628 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > httpd www # test that .chezmoiexternal.toml.tmpl is read (1.016s) > exec chezmoi apply > cmp $HOME/.file golden/.file > chhome home2/user # test that .chezmoiignore.tmpl is read (0.943s) > exec chezmoi apply > ! exists $HOME/.file > chhome home3/user # test that .chezmoiremove.tmpl is read (2.764s) > exec chezmoi apply > ! exists $HOME/.file PASS gpg: Warning: using insecure memory! gpg: keybox '/tmp/test-gpg-homedir2875187122/pubring.kbx' created === NAME TestScript/gpg testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'skipping gpg tests on Windows' > [!exec:gpg] skip 'gpg not found in $PATH' > mkhomedir > mkgpgconfig # test that chezmoi add --encrypt encrypts (1.199s) > cp golden/.encrypted $HOME > exec chezmoi add --encrypt $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 > exists $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc > grep '-----BEGIN PGP MESSAGE-----' $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc # test that chezmoi apply decrypts (1.420s) > rm $HOME/.encrypted > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 8E4FC98B235C9272, created 2024-02-12 "chezmoi-test-gpg-key" > cmp golden/.encrypted $HOME/.encrypted # test that chezmoi edit --apply transparently decrypts and re-encrypts (2.193s) > exec chezmoi edit --apply --force $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 8E4FC98B235C9272, created 2024-02-12 "chezmoi-test-gpg-key" chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-encrypted340259680/.encrypted: returned in less than 1s gpg: Warning: using insecure memory! gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 8E4FC98B235C9272, created 2024-02-12 "chezmoi-test-gpg-key" > grep '# edited' $HOME/.encrypted PASS === NAME TestScript/addencrypted testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'skipping gpg tests on Windows' > [!exec:gpg] skip 'gpg not found in $PATH' > mkgpgconfig > cp golden/.encrypted $HOME/.encrypted # test that chezmoi add adds a file unencrypted (0.932s) > exec chezmoi add $HOME${/}.encrypted > cmp $CHEZMOISOURCEDIR/dot_encrypted golden/.encrypted # test that chezmoi add --encrypt encrypts the file in the source state (0.821s) > exec chezmoi add --encrypt $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 > ! exists $CHEZMOISOURCEDIR/dot_encrypted > exists $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc > grep '-----BEGIN PGP MESSAGE-----' $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc # test that chezmoi add without --encrypt replaces the source file (1.361s) > exec chezmoi add --force $HOME${/}.encrypted > ! exists $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc > cmp $CHEZMOISOURCEDIR/dot_encrypted golden/.encrypted # test that chezmoi add always encrypts when add.encrypt is true (2.746s) > appendline $CHEZMOICONFIGDIR/chezmoi.toml '[add]' > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' encrypt = true' > cp golden/.encrypted $HOME/.encrypted2 > exec chezmoi add $HOME/.encrypted2 [stderr] gpg: Warning: using insecure memory! > exists $CHEZMOISOURCEDIR/encrypted_dot_encrypted2.asc PASS === NAME TestScript/externalarchiveinclude testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > symlink archive/symlink1 -> file1 > symlink archive/symlink2 -> file2 > mkdir www > exec tar czf www/archive.tar.gz archive > httpd www # test that chezmoi includes all files by default (0.754s) > exec chezmoi managed [stdout] .dir .dir/dir .dir/dir/subdir1 .dir/dir/subdir1/file1 .dir/dir/subdir1/file2 .dir/dir/subdir2 .dir/dir/subdir2/file1 .dir/dir/subdir2/file2 .dir/file1 .dir/file2 .dir/symlink1 .dir/symlink2 > cmp stdout golden/managed > chhome home2/user # test that chezmoi can include only certain files by default (0.915s) > exec chezmoi managed [stdout] .dir .dir/dir .dir/dir/subdir1 .dir/dir/subdir1/file1 .dir/dir/subdir1/file2 > cmp stdout golden/managed2 > chhome home3/user # test that chezmoi can exclude only certain files by default (0.707s) > exec chezmoi managed [stdout] .dir .dir/dir .dir/dir/subdir1 .dir/dir/subdir1/file1 .dir/file1 .dir/symlink1 > cmp stdout golden/managed3 > chhome home4/user # test that chezmoi can include and exclude files (1.250s) > exec chezmoi managed [stdout] .dir .dir/dir .dir/dir/subdir1 .dir/dir/subdir1/file1 .dir/dir/subdir2 .dir/dir/subdir2/file1 .dir/file1 .dir/symlink1 .dir/symlink2 > cmp stdout golden/managed4 > chhome home5/user # test that chezmoi can include selected files in sub-directories (2.732s) > exec chezmoi managed [stdout] .dir .dir/dir/subdir2/file1 .dir/dir/subdir2/file2 > cmp stdout golden/managed5 PASS === NAME TestScript/externalguess testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > httpd www # test that chezmoi sniffs the format of tar files (3.343s) > exec tar -cf www/archive.tar archive/ > cp www/archive.tar www/archive > exec chezmoi apply --force --refresh-externals > cmp $HOME/.dir/dir/file golden/dir/file # test that chezmoi sniffs the format of tar.bz2 files (0.828s) > exec tar -cjf www/archive.tar.bz2 archive/ > cp www/archive.tar.bz2 www/archive > exec chezmoi apply --force --refresh-externals > cmp $HOME/.dir/dir/file golden/dir/file # test that chezmoi sniffs the format of tar.gz files (1.064s) > exec tar -czf www/archive.tar.gz archive/ > cp www/archive.tar.gz www/archive > exec chezmoi apply --force --refresh-externals > cmp $HOME/.dir/dir/file golden/dir/file > [!exec:zip] stop 'zip not found in $PATH' # test that chezmoi sniffs the format of zip files (1.061s) > exec zip -r www/archive.zip archive [stdout] adding: archive/ (stored 0%) adding: archive/dir/ (stored 0%) adding: archive/dir/file (stored 0%) > cp www/archive.zip www/archive > exec chezmoi apply --force --refresh-externals > cmp $HOME/.dir/dir/file golden/dir/file > chhome home2/user # test that chezmoi allows the format to be overridden (0.984s) > cp www/archive.zip www/archive2.tar.gz > exec chezmoi apply --force > cmp $HOME/.dir/dir/file golden/dir/file PASS === NAME TestScript/applyskipencrypted testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'skipping gpg tests on Windows' > [!exec:gpg] skip 'gpg not found in $PATH' > mkhomedir > mkgpgconfig # test that chezmoi apply --exclude=encrypted does not apply encrypted files (2.044s) > cp golden/.encrypted $HOME > exec chezmoi add --encrypt $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 > rm $HOME/.encrypted > cp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi.toml > rm $CHEZMOICONFIGDIR/chezmoi.toml > exec chezmoi apply --force --exclude=encrypted > ! exists $HOME/.encrypted # test that chezmoi apply applies the encrypted file (2.984s) > cp golden/chezmoi.toml $CHEZMOICONFIGDIR/chezmoi.toml > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 037C5726BC9695E8, created 2024-02-12 "chezmoi-test-gpg-key" > cmp golden/.encrypted $HOME/.encrypted PASS === NAME TestScript/edgecases cmd.go:381: FIXME make the following test pass testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that the source directory can be a symlink to another directory (0.639s) > symlink $HOME/.chezmoi -> $CHEZMOISOURCEDIR > exec chezmoi apply --source=$HOME${/}.chezmoi > cmp $HOME/.file golden/.file # test that adding a directory ending in a slash only adds the directory once (1.041s) > mkdir $HOME/.dir > exec chezmoi add $HOME${/}.dir/ > ! exists $CHEZMOISOURCEDIR/dot_dir/dot_dir > chhome home2/user # test that chezmoi reports an inconsistent state error when a file should be both removed and present (0.914s) > ! exec chezmoi apply [stderr] chezmoi: .file: inconsistent state ($WORK/home2/user/.local/share/chezmoi/dot_file, remove) [exit status 1] > stderr 'chezmoi: \.file: inconsistent state' > chhome home3/user # test that chezmoi reports an error if there is a .chezmoi* file in the .chezmoitemplates directory (0.838s) > ! exec chezmoi status [stderr] chezmoi: $WORK/home3/user/.local/share/chezmoi/.chezmoitemplates/.chezmoiignore: not allowed in .chezmoitemplates directory [exit status 1] > stderr 'not allowed in \.chezmoitemplates directory' # test that chezmoi data returns an error if an unknown read format is specified (1.350s) > ! exec chezmoi init --config-format=yml [stderr] chezmoi: invalid argument "yml" for "--config-format" flag: invalid or unsupported data format [exit status 1] > stderr 'invalid or unsupported data format' # test that chezmoi data returns an error if an unknown write format is specified (0.806s) > ! exec chezmoi data --format=yml [stderr] chezmoi: invalid argument "yml" for "-f, --format" flag: invalid or unsupported data format [exit status 1] > stderr 'invalid or unsupported data format' > skip 'FIXME make the following test pass' === NAME TestScript/issue2092 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi dump warns when the config file has not been generated (1.158s) > exec chezmoi dump [stdout] { ".file": { "type": "file", "name": ".file", "contents": "# contents of .file\n", "perm": 420 } } [stderr] chezmoi: warning: config file template has changed, run chezmoi init to regenerate config file > [umask:002] cmp stdout golden/dump-umask-002.json > [umask:022] cmp stdout golden/dump-umask-022.json > stderr 'config file template has changed' # test that chezmoi dump does not return an error when the config file template has been modified (3.577s) > exec chezmoi init > edit $CHEZMOICONFIGDIR${/}chezmoi.toml > exec chezmoi dump [stdout] { ".file": { "type": "file", "name": ".file", "contents": "# contents of .file\n", "perm": 420 } } > [umask:002] cmp stdout golden/dump-umask-002.json > [umask:022] cmp stdout golden/dump-umask-022.json > ! stderr . PASS === NAME TestScript/import testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > symlink archive/.dir/.symlink -> .file > exec tar czf archive.tar.gz archive # test that chezmoi import imports an archive (1.205s) > exec chezmoi import --strip-components=1 archive.tar.gz > cmp $CHEZMOISOURCEDIR/dot_dir/dot_file golden/dot_dir/dot_file > [unix] cmp $CHEZMOISOURCEDIR/dot_dir/symlink_dot_symlink golden/dot_dir/symlink_dot_symlink # FIXME this should pass on Windows # test that chezmoi import run a second time overwrites (1.012s) > exec chezmoi import --strip-components=1 archive.tar.gz > chhome home2/user # test chezmoi import --destination (0.953s) > exec chezmoi import --strip-components=1 --destination=$HOME${/}.subdir archive.tar.gz > cmp $CHEZMOISOURCEDIR/dot_subdir/dot_dir/dot_file golden/dot_dir/dot_file > [unix] cmp $CHEZMOISOURCEDIR/dot_subdir/dot_dir/symlink_dot_symlink golden/dot_dir/symlink_dot_symlink # FIXME this should pass on Windows > chhome home3/user # test chezmoi --import --exclude (1.088s) > exec chezmoi import --strip-components=1 --destination=$HOME${/}.subdir --exclude=symlinks archive.tar.gz > cmp $CHEZMOISOURCEDIR/dot_subdir/dot_dir/dot_file golden/dot_dir/dot_file > ! exists $CHEZMOISOURCEDIR/dot_subdir/dot_dir/symlink_dot_symlink PASS === NAME TestScript/issue1832 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi add succeeds when changing the permissions of an intermediate directory (4.742s) > exec chezmoi add $HOME/.config/fish/config > chmod 700 $HOME/.config > exec chezmoi add --force --recursive=false $HOME/.config PASS === NAME TestScript/state testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] mkdir $CHEZMOICONFIGDIR # FIXME remove this # test that chezmoi state get returns nothing for a non-existing bucket/key (0.698s) > exec chezmoi state get --bucket=bucket --key=key > ! stdout . # test that chezmoi state set sets a value that can be retrieved with chezmoi state get (4.197s) > exec chezmoi state set --bucket=bucket --key=key --value=value > exec chezmoi state get --bucket=bucket --key=key [stdout] value> stdout value > exec chezmoi state data --format=yaml [stdout] bucket: key: value > cmp stdout golden/data.yaml # test that chezmoi state delete deletes a value (2.731s) > exec chezmoi state delete --bucket=bucket --key=key > ! stdout . > exec chezmoi state data --format=yaml [stdout] bucket: {} > cmp stdout golden/data-after-delete.yaml PASS gpg: /tmp/test-gpg-homedir2875187122/trustdb.gpg: trustdb created gpg: directory '/tmp/test-gpg-homedir2875187122/openpgp-revocs.d' created === NAME TestScript/templatevars testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > exec chezmoi execute-template '{{ .chezmoi.arch }}' [stdout] riscv64> [386] stdout 386 > [amd64] stdout amd64 > [arm] stdout arm > [arm64] stdout arm64 > [ppc64] stdout ppc64 > [ppc64le] stdout ppc64le > exec chezmoi execute-template '{{ index .chezmoi.args 1 }}' [stdout] execute-template> stdout execute-template > exec chezmoi execute-template '{{ .chezmoi.executable }}' [stdout] /tmp/testscript-main3957720979/bin/chezmoi> stdout [\\/]chezmoi(.exe)?$ > [unix] exec chezmoi execute-template '{{ .chezmoi.homeDir }}' [stdout] $WORK/home/user> [unix] stdout ${HOME@R} > exec chezmoi execute-template '{{ .chezmoi.os }}' [stdout] linux> [darwin] stdout darwin > [freebsd] stdout freebsd > [linux] stdout linux > [openbsd] stdout openbsd > [windows] stdout windows > exec chezmoi execute-template '{{ .chezmoi.sourceDir }}' [stdout] $WORK/home/user/.local/share/chezmoi> stdout ${CHEZMOISOURCEDIR@R} PASS === NAME TestScript/bitwarden testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/bw > [unix] chmod 755 bin/bws > [windows] unix2dos bin/bw.cmd > [windows] unix2dos bin/bws.cmd > [windows] unix2dos golden/bitwarden-attachment # test bitwarden template function (1.162s) > exec chezmoi execute-template '{{ (bitwarden "item" "example.com").login.password }}' [stdout] password-value> stdout ^password-value$ # test bitwardenFields template function (1.031s) > exec chezmoi execute-template '{{ (bitwardenFields "item" "example.com").Hidden.value }}' [stdout] hidden-value> stdout ^hidden-value$ # test bitwardenAttachment template function (0.963s) > exec chezmoi execute-template '{{ (bitwardenAttachment "filename" "item-id") }}' [stdout] hidden-file-value > cmp stdout golden/bitwarden-attachment # test bitwardenAttachmentByRef template function (1.116s) > exec chezmoi execute-template '{{ (bitwardenAttachmentByRef "filename" "item" "example.com") }}' [stdout] hidden-file-value > cmp stdout golden/bitwarden-attachment # test bitwardenSecrets template function (0.669s) > exec chezmoi execute-template '{{ (bitwardenSecrets "be8e0ad8-d545-4017-a55a-b02f014d4158" "0.48c78342-1635-48a6-accd-afbe01336365.C0tMmQqHnAp1h0gL8bngprlPOYutt0:B3h5D+YgLvFiQhWkIq6Bow==").value }}' [stdout] 0.982492bc-7f37-4475-9e60> stdout '^0\.982492bc-7f37-4475-9e60$' PASS gpg: revocation certificate stored as '/tmp/test-gpg-homedir2875187122/openpgp-revocs.d/E1DB31C24D476154BB629BC42998DC8E390AC987.rev' === NAME TestScript/issue2427 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > symlink archive/dir/symlink -> file > exec tar czf www/archive.tar.gz archive > httpd www # test that chezmoi managed lists all targets (1.190s) > exec chezmoi managed [stdout] .dir .dir/dir .dir/dir/file .dir/dir/symlink .encrypted .file > cmp stdout golden/managed # test that chezmoi managed --include=encrypted lists encrypted files only (3.121s) > exec chezmoi managed --include=encrypted [stdout] .encrypted > cmp stdout golden/managed-encrypted # test that chezmoi managed --include=externals lists external targets only (0.788s) > exec chezmoi managed --include=externals [stdout] .dir .dir/dir .dir/dir/file .dir/dir/symlink > cmp stdout golden/managed-externals PASS === NAME TestScript/apply testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir golden > mksourcedir # test that chezmoi apply --dry-run does not create any files (1.081s) > exec chezmoi apply --dry-run --force > ! exists $HOME/.create > ! exists $HOME/.dir > ! exists $HOME/.dir/file > ! exists $HOME/.dir/subdir > ! exists $HOME/.dir/subdir/file > ! exists $HOME/.empty > ! exists $HOME/.executable > ! exists $HOME/.file > ! exists $HOME/.private > ! exists $HOME/.remove > ! exists $HOME/.template # test that chezmoi apply file creates a single file only (0.633s) > exec chezmoi apply --force $HOME${/}.file > ! exists $HOME/.create > ! exists $HOME/.dir > ! exists $HOME/.dir/file > ! exists $HOME/.dir/subdir > ! exists $HOME/.dir/subdir/file > ! exists $HOME/.empty > ! exists $HOME/.executable > exists $HOME/.file > ! exists $HOME/.private > ! exists $HOME/.remove > ! exists $HOME/.template # test that chezmoi apply dir --recursive=false creates only the directory (0.578s) > exec chezmoi apply --force --recursive=false $HOME${/}.dir > exists $HOME/.dir > ! exists $HOME/.dir/file > ! exists $HOME/.dir/subdir > ! exists $HOME/.dir/subdir/file # test that chezmoi apply dir creates all files in the directory (0.690s) > exec chezmoi apply --force $HOME${/}.dir > exists $HOME/.dir > exists $HOME/.dir/file > exists $HOME/.dir/subdir > exists $HOME/.dir/subdir/file # test that chezmoi apply creates all files (1.073s) > exec chezmoi apply --force > exists $HOME/.create > exists $HOME/.dir > exists $HOME/.dir/file > exists $HOME/.dir/subdir > exists $HOME/.dir/subdir/file > exists $HOME/.empty > exists $HOME/.executable > exists $HOME/.file > exists $HOME/.private > ! exists $HOME/.remove > exists $HOME/.template # test apply after edit (0.881s) > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi apply --force > cmp $HOME/.file $CHEZMOISOURCEDIR/dot_file # test that chezmoi apply --source-path applies a file based on its source path (0.935s) > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi apply --force --source-path $CHEZMOISOURCEDIR/dot_file > grep -count=2 '# edited' $HOME/.file # test that chezmoi apply --source-path fails when called with a targetDirAbsPath (2.205s) > ! exec chezmoi apply --force --source-path $HOME${/}.file [stderr] chezmoi: $WORK/home/user/.file: not in $WORK/home/user/.local/share/chezmoi [exit status 1] PASS === NAME TestScript/hcpvaultsecrets testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [unix] chmod 755 bin/vlt # test hcpVaultSecret template function (2.835s) > exec chezmoi execute-template '{{ hcpVaultSecret "password" }}' [stdout] correcthorsebatterystaple > stdout ^correcthorsebatterystaple$ # test hcpVaultSecret template function with app name, project, and organization arguments (0.712s) > exec chezmoi execute-template '{{ hcpVaultSecret "password" "application-name" "project-id" "organization-id" }}' [stdout] correcthorsebatterystaple > stdout ^correcthorsebatterystaple$ # test hcpVaultSecret template function with empty app name, project, and organization arguments (1.407s) > exec chezmoi execute-template '{{ hcpVaultSecret "password" "" "" "" }}' [stdout] correcthorsebatterystaple > stdout ^correcthorsebatterystaple$ # test hcpVaultSecretJson template function (0.873s) > exec chezmoi execute-template '{{ (hcpVaultSecretJson "password").created_by.email }}' [stdout] user@example.com> stdout ^user@example\.com$ > chhome home2/user # test hcpVaultSecret template function with default app name, project, and organization arguments (2.732s) > exec chezmoi execute-template '{{ hcpVaultSecret "password" }}' [stdout] default-password > stdout ^default-password$ # test hcpVaultSecretJson template function with default project and organization arguments (1.190s) > exec chezmoi execute-template '{{ hcpVaultSecret "password" "other-app-name" }}' [stdout] other-password > stdout ^other-password$ PASS === NAME TestScript/remove testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir # test that chezmoi remove file removes a file (3.771s) > exec chezmoi apply --force > exists $HOME/.file > exec chezmoi remove --force $HOME${/}.file > ! exists $HOME/.file > exec chezmoi state get --bucket=entryState --key=$WORK/home/user/.file > ! stdout . # test that chezmoi remove dir removes a directory (0.980s) > exists $HOME/.dir > exec chezmoi remove --force $HOME${/}.dir > ! exists $HOME/.dir # test that if any chezmoi remove stops on any error (1.460s) > exists $HOME/.executable > ! exec chezmoi remove --force $HOME${/}.newfile $HOME${/}.executable [stderr] chezmoi: $WORK/home/user/.newfile: not managed [exit status 1] > stderr 'not managed' > exists $HOME/.executable > chhome home2/user # test that chezmoi apply removes a file and a directory (0.634s) > exists $HOME/.file > exists $HOME/.dir > exec chezmoi apply > ! exists $HOME/.file > ! exists $HOME/.dir > chhome home3/user # test that chezmoi apply with .chezmoiremove with star works on destination dir with trailing slash (0.727s) > exists $HOME/.star-file > exists $HOME/.star-dir > exec chezmoi apply --destination=$HOME/ > ! exists $HOME/.star-file > ! exists $HOME/.star-dir PASS === NAME TestScript/dumpjson testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!umask:022] skip > mksourcedir > exec chezmoi dump --format=json [stdout] { ".create": { "type": "file", "name": ".create", "contents": "# contents of .create\n", "perm": 420 }, ".dir": { "type": "dir", "name": ".dir", "perm": 493 }, ".dir/file": { "type": "file", "name": ".dir/file", "contents": "# contents of .dir/file\n", "perm": 420 }, ".dir/subdir": { "type": "dir", "name": ".dir/subdir", "perm": 493 }, ".dir/subdir/file": { "type": "file", "name": ".dir/subdir/file", "contents": "# contents of .dir/subdir/file\n", "perm": 420 }, ".empty": { "type": "file", "name": ".empty", "contents": "", "perm": 420 }, ".executable": { "type": "file", "name": ".executable", "contents": "# contents of .executable\n", "perm": 493 }, ".file": { "type": "file", "name": ".file", "contents": "# contents of .file\n", "perm": 420 }, ".private": { "type": "file", "name": ".private", "contents": "# contents of .private\n", "perm": 384 }, ".readonly": { "type": "file", "name": ".readonly", "contents": "# contents of .readonly\n", "perm": 292 }, ".symlink": { "type": "symlink", "name": ".symlink", "linkname": ".dir/subdir/file" }, ".template": { "type": "file", "name": ".template", "contents": "key = value\n", "perm": 420 } } > cmp stdout golden/dump.json > exec chezmoi dump --format=json $HOME${/}.file [stdout] { ".file": { "type": "file", "name": ".file", "contents": "# contents of .file\n", "perm": 420 } } > cmp stdout golden/dump-file.json > exec chezmoi dump --format=json $HOME${/}.dir [stdout] { ".dir": { "type": "dir", "name": ".dir", "perm": 493 }, ".dir/file": { "type": "file", "name": ".dir/file", "contents": "# contents of .dir/file\n", "perm": 420 }, ".dir/subdir": { "type": "dir", "name": ".dir/subdir", "perm": 493 }, ".dir/subdir/file": { "type": "file", "name": ".dir/subdir/file", "contents": "# contents of .dir/subdir/file\n", "perm": 420 } } > cmp stdout golden/dump-dir.json > exec chezmoi dump --format=json --recursive=false $HOME${/}.dir [stdout] { ".dir": { "type": "dir", "name": ".dir", "perm": 493 } } > cmp stdout golden/dump-dir-non-recursive.json > ! exec chezmoi dump $HOME${/}.inputrc [stderr] chezmoi: $WORK/home/user/.inputrc: not managed [exit status 1] > stderr 'not managed' PASS === NAME TestScript/issue3371 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > [windows] unix2dos golden/.file > mkgitconfig # create a dotfile repo with a config file template (3.515s) > exec chezmoi init > exec chezmoi git add . > exec chezmoi git commit -- --message 'Initial commit' [stdout] [master (root-commit) 4b31d7e] Initial commit 2 files changed, 3 insertions(+) create mode 100644 .chezmoi.yaml.tmpl create mode 100644 dot_file.tmpl > chhome home2/user # test that chezmoi init --apply sets environment variables during apply from the config file (4.190s) > exec chezmoi init --apply file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home2/user/.local/share/chezmoi'... > cmp $HOME/.file golden/.file PASS === NAME TestScript/edgecasesumask testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!umask:022] skip > mkhomedir # test that chezmoi add --dry-run does not modify anything (0.963s) > exec chezmoi add --dry-run $HOME${/}.file > ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb > ! exists $CHEZMOISOURCEDIR/dot_file # test that chezmoi add updates the persistent state (1.550s) > exec chezmoi add $HOME${/}.file > exists $CHEZMOICONFIGDIR/chezmoistate.boltdb > exists $CHEZMOISOURCEDIR/dot_file > exec chezmoi state dump [stdout] { "configState": {}, "entryState": { "$WORK/home/user/.file": { "contentsSHA256": "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663", "mode": 420, "type": "file" } }, "gitHubKeysState": {}, "gitHubLatestReleaseState": {}, "gitHubReleasesState": {}, "gitHubTagsState": {}, "gitRepoExternalState": {}, "scriptState": {} } > stdout 634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663 # sha256sum of "# contents of .file\n" # test that chezmoi apply updates the state if the target and destination states match, even if the last written state does not (4.649s) > edit $CHEZMOISOURCEDIR/dot_file > edit $HOME/.file > cmp $HOME/.file $CHEZMOISOURCEDIR/dot_file > exec chezmoi apply --dry-run $HOME${/}.file > exec chezmoi state dump [stdout] { "configState": {}, "entryState": { "$WORK/home/user/.file": { "contentsSHA256": "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663", "mode": 420, "type": "file" } }, "gitHubKeysState": {}, "gitHubLatestReleaseState": {}, "gitHubReleasesState": {}, "gitHubTagsState": {}, "gitRepoExternalState": {}, "scriptState": {} } > ! stdout 2e9dd6a2a8c15b20d4b0882d4c0fb8c7eea4e8ece46818090b387132f9f84c34 # sha256sum of "# contents of .file\n# edited\n" > exec chezmoi apply $HOME${/}.file > exec chezmoi state dump [stdout] { "configState": {}, "entryState": { "$WORK/home/user/.file": { "contentsSHA256": "2e9dd6a2a8c15b20d4b0882d4c0fb8c7eea4e8ece46818090b387132f9f84c34", "mode": 420, "type": "file" } }, "gitHubKeysState": {}, "gitHubLatestReleaseState": {}, "gitHubReleasesState": {}, "gitHubTagsState": {}, "gitRepoExternalState": {}, "scriptState": {} } > stdout 2e9dd6a2a8c15b20d4b0882d4c0fb8c7eea4e8ece46818090b387132f9f84c34 # sha256sum of "# contents of .file\n# edited\n" PASS === NAME TestScript/issue3421 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi runs run_once_ and run_onchange_ scripts only once (1.711s) > exec chezmoi apply [stdout] once onchange > stdout once > stdout onchange > exec chezmoi apply > ! stdout . # test that chezmoi runs run_once_ scripts after chezmoi state delete-bucket --bucket=scriptState (2.291s) > exec chezmoi state delete-bucket --bucket=scriptState > exec chezmoi apply [stdout] once > stdout once > ! stdout onchange # test that chezmoi runs run_once_ scripts after chezmoi state delete-bucket --bucket=entryState (3.970s) > exec chezmoi state delete-bucket --bucket=entryState > exec chezmoi apply [stdout] onchange > ! stdout once > stdout onchange PASS === NAME TestScript/targetpath testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'test requires path separator to be forward slash' > mksourcedir # test that chezmoi target-path without arguments prints the target directory (2.921s) > exec chezmoi target-path [stdout] $WORK/home/user > stdout ^${HOME@R}$ # test that chezmoi target-path prints the target path of a directory (1.193s) > exec chezmoi target-path $CHEZMOISOURCEDIR/dot_dir/exact_subdir [stdout] $WORK/home/user/.dir/subdir > stdout ^${HOME@R}/.dir/subdir$ # test that chezmoi target-path prints the target path of a file (1.330s) > exec chezmoi target-path $CHEZMOISOURCEDIR/dot_dir/exact_subdir/file [stdout] $WORK/home/user/.dir/subdir/file > stdout ^${HOME@R}/.dir/subdir/file$ # test that chezmoi target-path prints the target path of a script (1.301s) > exec chezmoi target-path $CHEZMOISOURCEDIR/run_script [stdout] $WORK/home/user/script > stdout ^${HOME@R}/script$ # test that chezmoi target-path prints the target path of a symlink (0.946s) > exec chezmoi target-path $CHEZMOISOURCEDIR/symlink_dot_symlink [stdout] $WORK/home/user/.symlink > stdout ^${HOME@R}/.symlink$ > chhome home2/user # test that chezmoi target-path respects .chezmoiroot (0.677s) > exec chezmoi target-path $CHEZMOISOURCEDIR/home/dot_file [stdout] $WORK/home2/user/.file > stdout ^${HOME@R}/\.file$ # test that chezmoi target-path respects .chezmoiscripts in .chezmoiroot (2.218s) > exec chezmoi target-path $CHEZMOISOURCEDIR/home/.chezmoiscripts/run_script.sh [stdout] $WORK/home2/user/.chezmoiscripts/script.sh > stdout ^${HOME@R}/\.chezmoiscripts/script\.sh$ PASS === NAME TestScript/errors testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test duplicate source state entry detection (1.218s) > cp $CHEZMOISOURCEDIR/dot_file $CHEZMOISOURCEDIR/empty_dot_file > ! exec chezmoi verify [stderr] chezmoi: .file: inconsistent state ($WORK/home/user/.local/share/chezmoi/dot_file, $WORK/home/user/.local/share/chezmoi/empty_dot_file) [exit status 1] > stderr 'inconsistent state' > chhome home2/user # test invalid config (0.563s) > ! exec chezmoi verify [stderr] chezmoi: invalid config: $WORK/home2/user/.config/chezmoi/chezmoi.json: unexpected EOF [exit status 1] > stderr 'invalid config' > chhome home3/user # test source directory is not a directory (0.896s) > ! exec chezmoi verify [stderr] chezmoi: $WORK/home3/user/.local/share/chezmoi: not a directory [exit status 1] > stderr 'not a directory' > chhome home4/user # test that chezmoi checks .chezmoiversion (1.232s) > ! exec chezmoi verify [stderr] chezmoi: source state requires chezmoi version 3.0.0 or later, chezmoi is version 2.0.0+test [exit status 1] > stderr 'source state requires chezmoi version' > chhome home5/user # test that chezmoi checks .chezmoiversion when .chezmoiroot is used (0.734s) > ! exec chezmoi verify [stderr] chezmoi: source state requires chezmoi version 3.0.0 or later, chezmoi is version 2.0.0+test [exit status 1] > stderr 'source state requires chezmoi version' > chhome home6/user # test duplicate script detection (0.793s) > ! exec chezmoi verify [stderr] chezmoi: install_packages: inconsistent state ($WORK/home6/user/.local/share/chezmoi/run_install_packages, $WORK/home6/user/.local/share/chezmoi/run_once_install_packages) [exit status 1] > stderr 'inconsistent state' > chhome home7/user # test that chezmoi init returns an error if there are multiple config file templates (3.135s) > ! exec chezmoi init [stderr] chezmoi: multiple config file templates: $WORK/home7/user/.local/share/chezmoi/.chezmoi.json.tmpl and $WORK/home7/user/.local/share/chezmoi/.chezmoi.toml.tmpl [exit status 1] > stderr 'multiple config file templates' > chhome home8/user # test that chezmoi verify returns an error if there are multiple config files (0.728s) > ! exec chezmoi verify [stderr] chezmoi: multiple config files: $WORK/home8/user/.config/chezmoi/chezmoi.json and $WORK/home8/user/.config/chezmoi/chezmoi.toml [exit status 1] > stderr 'multiple config files' # FIXME add more tests (0.000s) PASS === NAME TestScript/completion_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test chezmoi --include completion (1.172s) > exec chezmoi __complete apply --include=d [stdout] dirs :6 [stderr] Completion ended with directive: ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp > cmp stdout golden/complete-apply-include-d # test chezmoi --secrets completion (1.139s) > exec chezmoi __complete add --secrets=e [stdout] e error :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/complete-secrets-e # test chezmoi cat completion of targets in a directory (0.774s) > exec chezmoi __complete cat $HOME [stdout] $WORK/home/user/.dir/ $WORK/home/user/.dir/file $WORK/home/user/.file :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmpenv stdout golden/complete-target-home # test chezmoi cat completion of matching absolute targets (0.886s) > exec chezmoi __complete cat $HOME/.f [stdout] $WORK/home/user/.file :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmpenv stdout golden/complete-target-home-dot-f # test chezmoi cat completion of matching relative targets (2.286s) > cd $HOME $WORK/home/user > exec chezmoi __complete cat .f [stdout] .file :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmpenv stdout $WORK/golden/complete-dot-f-in-home > cd $WORK $WORK # test chezmoi chattr completion of attributes (1.482s) > exec chezmoi __complete chattr p [stdout] private :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/complete-attribute-p # test chezmoi chattr completion of targets (0.419s) > exec chezmoi __complete cat private $HOME [stdout] $WORK/home/user/.dir/ $WORK/home/user/.dir/file $WORK/home/user/.file :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmpenv stdout golden/complete-target-home PASS === NAME TestScript/issue2865 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > mkgitconfig # create a commit (3.735s) > exec chezmoi git init [stdout] Initialized empty Git repository in $WORK/home/user/.local/share/chezmoi/.git/ > exec chezmoi git add . > exec chezmoi git commit -- --message 'Initial commit' [stdout] [master (root-commit) aff0a8d] Initial commit 5 files changed, 14 insertions(+) create mode 100644 .chezmoiroot create mode 100644 home/.chezmoi.toml.tmpl create mode 100644 home/.chezmoiignore create mode 100644 home/.chezmoiscripts/run_once_echo.ps1.tmpl create mode 100644 home/.chezmoiscripts/run_once_echo.sh.tmpl > chhome home2/user # test that .chezmoi.sourceDir is set correctly when .chezmoiroot is present (chezmoi init --apply in a clean home directory) (2.039s) > mkgitconfig > exec chezmoi init --apply file://$WORK/home/user/.local/share/chezmoi [stdout] .chezmoi.sourceDir=$WORK/home2/user/.local/share/chezmoi/home CHEZMOI_SOURCE_DIR=$WORK/home2/user/.local/share/chezmoi/home [stderr] Cloning into '$WORK/home2/user/.local/share/chezmoi'... > stdout '\.chezmoi\.sourceDir=.*/\.local/share/chezmoi/home$' > stdout 'CHEZMOI_SOURCE_DIR=.*/\.local/share/chezmoi/home$' # test that .chezmoi.sourceDir is set correctly in config file (0.761s) > exec chezmoi execute-template '{{ .testDir }}' [stdout] $WORK/home2/user/.local/share/chezmoi/home> stdout '/.local/share/chezmoi/home$' PASS === NAME TestScript/unmanaged testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir > exec chezmoi unmanaged [stdout] .local > cmp stdout golden/unmanaged > rm $CHEZMOISOURCEDIR/dot_dir > exec chezmoi unmanaged [stdout] .dir .local > cmp stdout golden/unmanaged-dir > rm $CHEZMOISOURCEDIR/dot_file > exec chezmoi unmanaged [stdout] .dir .file .local > cmp stdout golden/unmanaged-dir-file # test chezmoi unmanaged with arguments (1.186s) > exec chezmoi unmanaged $HOME${/}.dir $HOME${/}.file [stdout] .dir .file > cmp stdout golden/unmanaged-with-args # test chezmoi unmanaged, with child of unmanaged dir as argument (0.892s) > exec chezmoi unmanaged $HOME${/}.dir/subdir [stdout] .dir/subdir > cmp stdout golden/unmanaged-inside-unmanaged # test chezmoi unmanaged with managed arguments (2.698s) > exec chezmoi unmanaged $HOME${/}.create $HOME${/}.file [stdout] .file > cmp stdout golden/unmanaged-with-some-managed # test that chezmoi unmanaged with absent paths should fail (0.728s) > ! exec chezmoi unmanaged $HOME${/}absent-path [stderr] chezmoi: lstat $WORK/home/user/absent-path: no such file or directory [exit status 1] # test chezmoi unmanaged --path-style=absolute (1.075s) > [unix] exec chezmoi unmanaged --path-style=absolute [stdout] $WORK/home/user/.dir $WORK/home/user/.file $WORK/home/user/.local > [unix] cmpenv stdout golden/unmanaged-absolute PASS === NAME TestScript/state_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that the persistent state is only created on demand (1.628s) > exec chezmoi state dump --format=yaml [stdout] configState: {} entryState: {} gitHubKeysState: {} gitHubLatestReleaseState: {} gitHubReleasesState: {} gitHubTagsState: {} gitRepoExternalState: {} scriptState: {} > cmp stdout golden/dump.yaml > ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb # test that chezmoi apply updates the persistent state (0.950s) > exec chezmoi apply --force [stdout] script > exists $CHEZMOICONFIGDIR/chezmoistate.boltdb # test that the persistent state records that script was run (1.054s) > exec chezmoi state dump --format=yaml [stdout] configState: {} entryState: $WORK/home/user/script.sh: contentsSHA256: 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135 type: script gitHubKeysState: {} gitHubLatestReleaseState: {} gitHubReleasesState: {} gitHubTagsState: {} gitRepoExternalState: {} scriptState: 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135: name: script.sh runAt: "2024-02-12T14:22:31.512889019Z" > stdout 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135: > stdout runAt: # test that chezmoi get-bucket gets a bucket (0.916s) > exec chezmoi state get-bucket --bucket=scriptState [stdout] { "70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135": { "name": "script.sh", "runAt": "2024-02-12T14:22:31.512889019Z" } } > stdout "runAt": # test that chezmoi delete-bucket deletes a bucket (2.359s) > exec chezmoi state delete-bucket --bucket=scriptState > exec chezmoi state dump --format=yaml [stdout] configState: {} entryState: $WORK/home/user/script.sh: contentsSHA256: 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135 type: script gitHubKeysState: {} gitHubLatestReleaseState: {} gitHubReleasesState: {} gitHubTagsState: {} gitRepoExternalState: {} scriptState: {} > ! stdout runAt: # test that chezmoi state reset removes the persistent state (2.475s) > exec chezmoi --force state reset > ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb # test that the --persistent-state option sets the persistent state file (1.924s) > exec chezmoi apply --force [stdout] script > stdout script > exec chezmoi apply --force --persistent-state=$CHEZMOICONFIGDIR${/}chezmoistate2.boltdb [stdout] script > exists $CHEZMOICONFIGDIR${/}chezmoistate2.boltdb > stdout script > exec chezmoi state dump --format=yaml --persistent-state=$CHEZMOICONFIGDIR${/}chezmoistate2.boltdb [stdout] configState: {} entryState: $WORK/home/user/script.sh: contentsSHA256: 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135 type: script gitHubKeysState: {} gitHubLatestReleaseState: {} gitHubReleasesState: {} gitHubTagsState: {} gitRepoExternalState: {} scriptState: 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135: name: script.sh runAt: "2024-02-12T14:22:39.826118153Z" > stdout 70396a619400b7f78dbb83ab8ddb76ffe0b8e31557e64bab2ca9677818a52135: > stdout runAt: PASS === NAME TestScript/cat testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir golden > mksourcedir # test that chezmoi cat prints an empty file (0.981s) > exec chezmoi cat $HOME${/}.empty > cmp stdout golden/.empty # test that chezmoi cat prints a file (0.797s) > exec chezmoi cat $HOME${/}.file [stdout] # contents of .file > cmp stdout golden/.file # test that chezmoi cat prints a symlink (0.640s) > exec chezmoi cat $HOME${/}.symlink [stdout] .dir/subdir/file > stdout '\.dir/subdir/file' # test that chezmoi cat prints a template (0.894s) > exec chezmoi cat $HOME${/}.template [stdout] key = value > cmp stdout golden/.template # test that chezmoi cat does not print directories (3.225s) > ! exec chezmoi cat $HOME${/}.dir [stderr] chezmoi: .dir: not a file, script, or symlink [exit status 1] > stderr 'not a file, script, or symlink' # test that chezmoi cat does not print files outside the destination directory (1.234s) > ! exec chezmoi cat ${/}etc${/}passwd [stderr] chezmoi: /etc/passwd: not in destination directory ($WORK/home/user) [exit status 1] > stderr 'not in destination directory' # test that chezmoi cat uses relative paths (1.090s) > mkdir $HOME/.dir > cd $HOME/.dir $WORK/home/user/.dir > exec chezmoi cat file [stdout] # contents of .dir/file > cmp stdout $WORK/golden/.dir/file PASS === NAME TestScript/issue1213 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > mkgitconfig # create a repo (3.187s) > exec chezmoi init > exists $CHEZMOISOURCEDIR/.git > cp golden/.chezmoi.toml.tmpl $CHEZMOISOURCEDIR > cp golden/dot_file.tmpl $CHEZMOISOURCEDIR > exec chezmoi git add . > exec chezmoi git commit -- --message 'Initial commit' [stdout] [master (root-commit) 44c993d] Initial commit 2 files changed, 3 insertions(+) create mode 100644 .chezmoi.toml.tmpl create mode 100644 dot_file.tmpl > chhome home2/user # test that chezmoi init --apply makes config template data available (3.839s) > mkgitconfig > exec chezmoi init --apply file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home2/user/.local/share/chezmoi'... > cmp $HOME/.file golden/.file PASS === NAME TestScript/completion testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi completion bash generates bash completions (1.460s) > exec chezmoi completion bash [stdout] # bash completion V2 for chezmoi -*- shell-script -*- __chezmoi_debug() { if [[ -n ${BASH_COMP_DEBUG_FILE-} ]]; then echo "$*" >> "${BASH_COMP_DEBUG_FILE}" fi } # Macs have bash3 for which the bash-completion package doesn't include # _init_completion. This is a minimal version of that function. __chezmoi_init_completion() { COMPREPLY=() _get_comp_words_by_ref "$@" cur prev words cword } # This function calls the chezmoi program to obtain the completion # results and the directive. It fills the 'out' and 'directive' vars. __chezmoi_get_completion_results() { local requestComp lastParam lastChar args # Prepare the command to request completions for the program. # Calling ${words[0]} instead of directly chezmoi allows handling aliases args=("${words[@]:1}") requestComp="${words[0]} __complete ${args[*]}" lastParam=${words[$((${#words[@]}-1))]} lastChar=${lastParam:$((${#lastParam}-1)):1} __chezmoi_debug "lastParam ${lastParam}, lastChar ${lastChar}" if [[ -z ${cur} && ${lastChar} != = ]]; then # If the last parameter is complete (there is a space following it) # We add an extra empty parameter so we can indicate this to the go method. __chezmoi_debug "Adding extra empty parameter" requestComp="${requestComp} ''" fi # When completing a flag with an = (e.g., chezmoi -n=) # bash focuses on the part after the =, so we need to remove # the flag part from $cur if [[ ${cur} == -*=* ]]; then cur="${cur#*=}" fi __chezmoi_debug "Calling ${requestComp}" # Use eval to handle any environment variables and such out=$(eval "${requestComp}" 2>/dev/null) # Extract the directive integer at the very end of the output following a colon (:) directive=${out##*:} # Remove the directive out=${out%:*} if [[ ${directive} == "${out}" ]]; then # There is not directive specified directive=0 fi __chezmoi_debug "The completion directive is: ${directive}" __chezmoi_debug "The completions are: ${out}" } __chezmoi_process_completion_results() { local shellCompDirectiveError=1 local shellCompDirectiveNoSpace=2 local shellCompDirectiveNoFileComp=4 local shellCompDirectiveFilterFileExt=8 local shellCompDirectiveFilterDirs=16 local shellCompDirectiveKeepOrder=32 if (((directive & shellCompDirectiveError) != 0)); then # Error code. No completion. __chezmoi_debug "Received error from custom completion go code" return else if (((directive & shellCompDirectiveNoSpace) != 0)); then if [[ $(type -t compopt) == builtin ]]; then __chezmoi_debug "Activating no space" compopt -o nospace else __chezmoi_debug "No space directive not supported in this version of bash" fi fi if (((directive & shellCompDirectiveKeepOrder) != 0)); then if [[ $(type -t compopt) == builtin ]]; then # no sort isn't supported for bash less than < 4.4 if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then __chezmoi_debug "No sort directive not supported in this version of bash" else __chezmoi_debug "Activating keep order" compopt -o nosort fi else __chezmoi_debug "No sort directive not supported in this version of bash" fi fi if (((directive & shellCompDirectiveNoFileComp) != 0)); then if [[ $(type -t compopt) == builtin ]]; then __chezmoi_debug "Activating no file completion" compopt +o default else __chezmoi_debug "No file completion directive not supported in this version of bash" fi fi fi # Separate activeHelp from normal completions local completions=() local activeHelp=() __chezmoi_extract_activeHelp if (((directive & shellCompDirectiveFilterFileExt) != 0)); then # File extension filtering local fullFilter filter filteringCmd # Do not use quotes around the $completions variable or else newline # characters will be kept. for filter in ${completions[*]}; do fullFilter+="$filter|" done filteringCmd="_filedir $fullFilter" __chezmoi_debug "File filtering command: $filteringCmd" $filteringCmd elif (((directive & shellCompDirectiveFilterDirs) != 0)); then # File completion for directories only local subdir subdir=${completions[0]} if [[ -n $subdir ]]; then __chezmoi_debug "Listing directories in $subdir" pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return else __chezmoi_debug "Listing directories in ." _filedir -d fi else __chezmoi_handle_completion_types fi __chezmoi_handle_special_char "$cur" : __chezmoi_handle_special_char "$cur" = # Print the activeHelp statements before we finish if ((${#activeHelp[*]} != 0)); then printf "\n"; printf "%s\n" "${activeHelp[@]}" printf "\n" # The prompt format is only available from bash 4.4. # We test if it is available before using it. if (x=${PS1@P}) 2> /dev/null; then printf "%s" "${PS1@P}${COMP_LINE[@]}" else # Can't print the prompt. Just print the # text the user had typed, it is workable enough. printf "%s" "${COMP_LINE[@]}" fi fi } # Separate activeHelp lines from real completions. # Fills the $activeHelp and $completions arrays. __chezmoi_extract_activeHelp() { local activeHelpMarker="_activeHelp_ " local endIndex=${#activeHelpMarker} while IFS='' read -r comp; do if [[ ${comp:0:endIndex} == $activeHelpMarker ]]; then comp=${comp:endIndex} __chezmoi_debug "ActiveHelp found: $comp" if [[ -n $comp ]]; then activeHelp+=("$comp") fi else # Not an activeHelp line but a normal completion completions+=("$comp") fi done <<<"${out}" } __chezmoi_handle_completion_types() { __chezmoi_debug "__chezmoi_handle_completion_types: COMP_TYPE is $COMP_TYPE" case $COMP_TYPE in 37|42) # Type: menu-complete/menu-complete-backward and insert-completions # If the user requested inserting one completion at a time, or all # completions at once on the command-line we must remove the descriptions. # https://github.com/spf13/cobra/issues/1508 local tab=$'\t' comp while IFS='' read -r comp; do [[ -z $comp ]] && continue # Strip any description comp=${comp%%$tab*} # Only consider the completions that match if [[ $comp == "$cur"* ]]; then COMPREPLY+=("$comp") fi done < <(printf "%s\n" "${completions[@]}") ;; *) # Type: complete (normal completion) __chezmoi_handle_standard_completion_case ;; esac } __chezmoi_handle_standard_completion_case() { local tab=$'\t' comp # Short circuit to optimize if we don't have descriptions if [[ "${completions[*]}" != *$tab* ]]; then IFS=$'\n' read -ra COMPREPLY -d '' < <(compgen -W "${completions[*]}" -- "$cur") return 0 fi local longest=0 local compline # Look for the longest completion so that we can format things nicely while IFS='' read -r compline; do [[ -z $compline ]] && continue # Strip any description before checking the length comp=${compline%%$tab*} # Only consider the completions that match [[ $comp == "$cur"* ]] || continue COMPREPLY+=("$compline") if ((${#comp}>longest)); then longest=${#comp} fi done < <(printf "%s\n" "${completions[@]}") # If there is a single completion left, remove the description text if ((${#COMPREPLY[*]} == 1)); then __chezmoi_debug "COMPREPLY[0]: ${COMPREPLY[0]}" comp="${COMPREPLY[0]%%$tab*}" __chezmoi_debug "Removed description from single completion, which is now: ${comp}" COMPREPLY[0]=$comp else # Format the descriptions __chezmoi_format_comp_descriptions $longest fi } __chezmoi_handle_special_char() { local comp="$1" local char=$2 if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then local word=${comp%"${comp##*${char}}"} local idx=${#COMPREPLY[*]} while ((--idx >= 0)); do COMPREPLY[idx]=${COMPREPLY[idx]#"$word"} done fi } __chezmoi_format_comp_descriptions() { local tab=$'\t' local comp desc maxdesclength local longest=$1 local i ci for ci in ${!COMPREPLY[*]}; do comp=${COMPREPLY[ci]} # Properly format the description string which follows a tab character if there is one if [[ "$comp" == *$tab* ]]; then __chezmoi_debug "Original comp: $comp" desc=${comp#*$tab} comp=${comp%%$tab*} # $COLUMNS stores the current shell width. # Remove an extra 4 because we add 2 spaces and 2 parentheses. maxdesclength=$(( COLUMNS - longest - 4 )) # Make sure we can fit a description of at least 8 characters # if we are to align the descriptions. if ((maxdesclength > 8)); then # Add the proper number of spaces to align the descriptions for ((i = ${#comp} ; i < longest ; i++)); do comp+=" " done else # Don't pad the descriptions so we can fit more text after the completion maxdesclength=$(( COLUMNS - ${#comp} - 4 )) fi # If there is enough space for any description text, # truncate the descriptions that are too long for the shell width if ((maxdesclength > 0)); then if ((${#desc} > maxdesclength)); then desc=${desc:0:$(( maxdesclength - 1 ))} desc+="…" fi comp+=" ($desc)" fi COMPREPLY[ci]=$comp __chezmoi_debug "Final comp: $comp" fi done } __start_chezmoi() { local cur prev words cword split COMPREPLY=() # Call _init_completion from the bash-completion package # to prepare the arguments properly if declare -F _init_completion >/dev/null 2>&1; then _init_completion -n =: || return else __chezmoi_init_completion -n =: || return fi __chezmoi_debug __chezmoi_debug "========= starting completion logic ==========" __chezmoi_debug "cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}, cword is $cword" # The user could have moved the cursor backwards on the command-line. # We need to trigger completion from the $cword location, so we need # to truncate the command-line ($words) up to the $cword location. words=("${words[@]:0:$cword+1}") __chezmoi_debug "Truncated words[*]: ${words[*]}," local out directive __chezmoi_get_completion_results __chezmoi_process_completion_results } if [[ $(type -t compopt) = "builtin" ]]; then complete -o default -F __start_chezmoi chezmoi else complete -o default -o nospace -F __start_chezmoi chezmoi fi # ex: ts=4 sw=4 et filetype=sh > stdout '# bash completion V2 for chezmoi' # test that chezmoi completion fish generates fish completions (0.589s) > exec chezmoi completion fish [stdout] # fish completion for chezmoi -*- shell-script -*- function __chezmoi_debug set -l file "$BASH_COMP_DEBUG_FILE" if test -n "$file" echo "$argv" >> $file end end function __chezmoi_perform_completion __chezmoi_debug "Starting __chezmoi_perform_completion" # Extract all args except the last one set -l args (commandline -opc) # Extract the last arg and escape it in case it is a space set -l lastArg (string escape -- (commandline -ct)) __chezmoi_debug "args: $args" __chezmoi_debug "last arg: $lastArg" # Disable ActiveHelp which is not supported for fish shell set -l requestComp "CHEZMOI_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg" __chezmoi_debug "Calling $requestComp" set -l results (eval $requestComp 2> /dev/null) # Some programs may output extra empty lines after the directive. # Let's ignore them or else it will break completion. # Ref: https://github.com/spf13/cobra/issues/1279 for line in $results[-1..1] if test (string trim -- $line) = "" # Found an empty line, remove it set results $results[1..-2] else # Found non-empty line, we have our proper output break end end set -l comps $results[1..-2] set -l directiveLine $results[-1] # For Fish, when completing a flag with an = (e.g., -n=) # completions must be prefixed with the flag set -l flagPrefix (string match -r -- '-.*=' "$lastArg") __chezmoi_debug "Comps: $comps" __chezmoi_debug "DirectiveLine: $directiveLine" __chezmoi_debug "flagPrefix: $flagPrefix" for comp in $comps printf "%s%s\n" "$flagPrefix" "$comp" end printf "%s\n" "$directiveLine" end # this function limits calls to __chezmoi_perform_completion, by caching the result behind $__chezmoi_perform_completion_once_result function __chezmoi_perform_completion_once __chezmoi_debug "Starting __chezmoi_perform_completion_once" if test -n "$__chezmoi_perform_completion_once_result" __chezmoi_debug "Seems like a valid result already exists, skipping __chezmoi_perform_completion" return 0 end set --global __chezmoi_perform_completion_once_result (__chezmoi_perform_completion) if test -z "$__chezmoi_perform_completion_once_result" __chezmoi_debug "No completions, probably due to a failure" return 1 end __chezmoi_debug "Performed completions and set __chezmoi_perform_completion_once_result" return 0 end # this function is used to clear the $__chezmoi_perform_completion_once_result variable after completions are run function __chezmoi_clear_perform_completion_once_result __chezmoi_debug "" __chezmoi_debug "========= clearing previously set __chezmoi_perform_completion_once_result variable ==========" set --erase __chezmoi_perform_completion_once_result __chezmoi_debug "Successfully erased the variable __chezmoi_perform_completion_once_result" end function __chezmoi_requires_order_preservation __chezmoi_debug "" __chezmoi_debug "========= checking if order preservation is required ==========" __chezmoi_perform_completion_once if test -z "$__chezmoi_perform_completion_once_result" __chezmoi_debug "Error determining if order preservation is required" return 1 end set -l directive (string sub --start 2 $__chezmoi_perform_completion_once_result[-1]) __chezmoi_debug "Directive is: $directive" set -l shellCompDirectiveKeepOrder 32 set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2) __chezmoi_debug "Keeporder is: $keeporder" if test $keeporder -ne 0 __chezmoi_debug "This does require order preservation" return 0 end __chezmoi_debug "This doesn't require order preservation" return 1 end # This function does two things: # - Obtain the completions and store them in the global __chezmoi_comp_results # - Return false if file completion should be performed function __chezmoi_prepare_completions __chezmoi_debug "" __chezmoi_debug "========= starting completion logic ==========" # Start fresh set --erase __chezmoi_comp_results __chezmoi_perform_completion_once __chezmoi_debug "Completion results: $__chezmoi_perform_completion_once_result" if test -z "$__chezmoi_perform_completion_once_result" __chezmoi_debug "No completion, probably due to a failure" # Might as well do file completion, in case it helps return 1 end set -l directive (string sub --start 2 $__chezmoi_perform_completion_once_result[-1]) set --global __chezmoi_comp_results $__chezmoi_perform_completion_once_result[1..-2] __chezmoi_debug "Completions are: $__chezmoi_comp_results" __chezmoi_debug "Directive is: $directive" set -l shellCompDirectiveError 1 set -l shellCompDirectiveNoSpace 2 set -l shellCompDirectiveNoFileComp 4 set -l shellCompDirectiveFilterFileExt 8 set -l shellCompDirectiveFilterDirs 16 if test -z "$directive" set directive 0 end set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2) if test $compErr -eq 1 __chezmoi_debug "Received error directive: aborting." # Might as well do file completion, in case it helps return 1 end set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2) set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2) if test $filefilter -eq 1; or test $dirfilter -eq 1 __chezmoi_debug "File extension filtering or directory filtering not supported" # Do full file completion instead return 1 end set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2) set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2) __chezmoi_debug "nospace: $nospace, nofiles: $nofiles" # If we want to prevent a space, or if file completion is NOT disabled, # we need to count the number of valid completions. # To do so, we will filter on prefix as the completions we have received # may not already be filtered so as to allow fish to match on different # criteria than the prefix. if test $nospace -ne 0; or test $nofiles -eq 0 set -l prefix (commandline -t | string escape --style=regex) __chezmoi_debug "prefix: $prefix" set -l completions (string match -r -- "^$prefix.*" $__chezmoi_comp_results) set --global __chezmoi_comp_results $completions __chezmoi_debug "Filtered completions are: $__chezmoi_comp_results" # Important not to quote the variable for count to work set -l numComps (count $__chezmoi_comp_results) __chezmoi_debug "numComps: $numComps" if test $numComps -eq 1; and test $nospace -ne 0 # We must first split on \t to get rid of the descriptions to be # able to check what the actual completion will be. # We don't need descriptions anyway since there is only a single # real completion which the shell will expand immediately. set -l split (string split --max 1 \t $__chezmoi_comp_results[1]) # Fish won't add a space if the completion ends with any # of the following characters: @=/:., set -l lastChar (string sub -s -1 -- $split) if not string match -r -q "[@=/:.,]" -- "$lastChar" # In other cases, to support the "nospace" directive we trick the shell # by outputting an extra, longer completion. __chezmoi_debug "Adding second completion to perform nospace directive" set --global __chezmoi_comp_results $split[1] $split[1]. __chezmoi_debug "Completions are now: $__chezmoi_comp_results" end end if test $numComps -eq 0; and test $nofiles -eq 0 # To be consistent with bash and zsh, we only trigger file # completion when there are no other completions __chezmoi_debug "Requesting file completion" return 1 end end return 0 end # Since Fish completions are only loaded once the user triggers them, we trigger them ourselves # so we can properly delete any completions provided by another script. # Only do this if the program can be found, or else fish may print some errors; besides, # the existing completions will only be loaded if the program can be found. if type -q "chezmoi" # The space after the program name is essential to trigger completion for the program # and not completion of the program name itself. # Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish. complete --do-complete "chezmoi " > /dev/null 2>&1 end # Remove any pre-existing completions for the program since we will be handling all of them. complete -c chezmoi -e # this will get called after the two calls below and clear the $__chezmoi_perform_completion_once_result global complete -c chezmoi -n '__chezmoi_clear_perform_completion_once_result' # The call to __chezmoi_prepare_completions will setup __chezmoi_comp_results # which provides the program's completion choices. # If this doesn't require order preservation, we don't use the -k flag complete -c chezmoi -n 'not __chezmoi_requires_order_preservation && __chezmoi_prepare_completions' -f -a '$__chezmoi_comp_results' # otherwise we use the -k flag complete -k -c chezmoi -n '__chezmoi_requires_order_preservation && __chezmoi_prepare_completions' -f -a '$__chezmoi_comp_results' > stdout '# fish completion for chezmoi' # test that chezmoi completion powershell generates powershell completions (0.716s) > exec chezmoi completion powershell [stdout] # powershell completion for chezmoi -*- shell-script -*- function __chezmoi_debug { if ($env:BASH_COMP_DEBUG_FILE) { "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" } } filter __chezmoi_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' } [scriptblock]${__chezmoiCompleterBlock} = { param( $WordToComplete, $CommandAst, $CursorPosition ) # Get the current command line and convert into a string $Command = $CommandAst.CommandElements $Command = "$Command" __chezmoi_debug "" __chezmoi_debug "========= starting completion logic ==========" __chezmoi_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" # The user could have moved the cursor backwards on the command-line. # We need to trigger completion from the $CursorPosition location, so we need # to truncate the command-line ($Command) up to the $CursorPosition location. # Make sure the $Command is longer then the $CursorPosition before we truncate. # This happens because the $Command does not include the last space. if ($Command.Length -gt $CursorPosition) { $Command=$Command.Substring(0,$CursorPosition) } __chezmoi_debug "Truncated command: $Command" $ShellCompDirectiveError=1 $ShellCompDirectiveNoSpace=2 $ShellCompDirectiveNoFileComp=4 $ShellCompDirectiveFilterFileExt=8 $ShellCompDirectiveFilterDirs=16 $ShellCompDirectiveKeepOrder=32 # Prepare the command to request completions for the program. # Split the command at the first space to separate the program and arguments. $Program,$Arguments = $Command.Split(" ",2) $RequestComp="$Program __completeNoDesc $Arguments" __chezmoi_debug "RequestComp: $RequestComp" # we cannot use $WordToComplete because it # has the wrong values if the cursor was moved # so use the last argument if ($WordToComplete -ne "" ) { $WordToComplete = $Arguments.Split(" ")[-1] } __chezmoi_debug "New WordToComplete: $WordToComplete" # Check for flag with equal sign $IsEqualFlag = ($WordToComplete -Like "--*=*" ) if ( $IsEqualFlag ) { __chezmoi_debug "Completing equal sign flag" # Remove the flag part $Flag,$WordToComplete = $WordToComplete.Split("=",2) } if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { # If the last parameter is complete (there is a space following it) # We add an extra empty parameter so we can indicate this to the go method. __chezmoi_debug "Adding extra empty parameter" # PowerShell 7.2+ changed the way how the arguments are passed to executables, # so for pre-7.2 or when Legacy argument passing is enabled we need to use # `"`" to pass an empty argument, a "" or '' does not work!!! if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or ($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or (($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and $PSNativeCommandArgumentPassing -eq 'Legacy')) { $RequestComp="$RequestComp" + ' `"`"' } else { $RequestComp="$RequestComp" + ' ""' } } __chezmoi_debug "Calling $RequestComp" # First disable ActiveHelp which is not supported for Powershell ${env:CHEZMOI_ACTIVE_HELP}=0 #call the command store the output in $out and redirect stderr and stdout to null # $Out is an array contains each line per element Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null # get directive from last line [int]$Directive = $Out[-1].TrimStart(':') if ($Directive -eq "") { # There is no directive specified $Directive = 0 } __chezmoi_debug "The completion directive is: $Directive" # remove directive (last element) from out $Out = $Out | Where-Object { $_ -ne $Out[-1] } __chezmoi_debug "The completions are: $Out" if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { # Error code. No completion. __chezmoi_debug "Received error from custom completion go code" return } $Longest = 0 [Array]$Values = $Out | ForEach-Object { #Split the output in name and description $Name, $Description = $_.Split("`t",2) __chezmoi_debug "Name: $Name Description: $Description" # Look for the longest completion so that we can format things nicely if ($Longest -lt $Name.Length) { $Longest = $Name.Length } # Set the description to a one space string if there is none set. # This is needed because the CompletionResult does not accept an empty string as argument if (-Not $Description) { $Description = " " } @{Name="$Name";Description="$Description"} } $Space = " " if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { # remove the space here __chezmoi_debug "ShellCompDirectiveNoSpace is called" $Space = "" } if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or (($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { __chezmoi_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" # return here to prevent the completion of the extensions return } $Values = $Values | Where-Object { # filter the result $_.Name -like "$WordToComplete*" # Join the flag back if we have an equal sign flag if ( $IsEqualFlag ) { __chezmoi_debug "Join the equal sign flag back to the completion value" $_.Name = $Flag + "=" + $_.Name } } # we sort the values in ascending order by name if keep order isn't passed if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) { $Values = $Values | Sort-Object -Property Name } if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { __chezmoi_debug "ShellCompDirectiveNoFileComp is called" if ($Values.Length -eq 0) { # Just print an empty string here so the # shell does not start to complete paths. # We cannot use CompletionResult here because # it does not accept an empty string as argument. "" return } } # Get the current mode $Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function __chezmoi_debug "Mode: $Mode" $Values | ForEach-Object { # store temporary because switch will overwrite $_ $comp = $_ # PowerShell supports three different completion modes # - TabCompleteNext (default windows style - on each key press the next option is displayed) # - Complete (works like bash) # - MenuComplete (works like zsh) # You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function # CompletionResult Arguments: # 1) CompletionText text to be used as the auto completion result # 2) ListItemText text to be displayed in the suggestion list # 3) ResultType type of completion result # 4) ToolTip text for the tooltip with details about the object switch ($Mode) { # bash like "Complete" { if ($Values.Length -eq 1) { __chezmoi_debug "Only one completion left" # insert space after value [System.Management.Automation.CompletionResult]::new($($comp.Name | __chezmoi_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } else { # Add the proper number of spaces to align the descriptions while($comp.Name.Length -lt $Longest) { $comp.Name = $comp.Name + " " } # Check for empty description and only add parentheses if needed if ($($comp.Description) -eq " " ) { $Description = "" } else { $Description = " ($($comp.Description))" } [System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") } } # zsh like "MenuComplete" { # insert space after value # MenuComplete will automatically show the ToolTip of # the highlighted value at the bottom of the suggestions. [System.Management.Automation.CompletionResult]::new($($comp.Name | __chezmoi_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } # TabCompleteNext and in case we get something unknown Default { # Like MenuComplete but we don't want to add a space here because # the user need to press space anyway to get the completion. # Description will not be shown because that's not possible with TabCompleteNext [System.Management.Automation.CompletionResult]::new($($comp.Name | __chezmoi_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") } } } } Register-ArgumentCompleter -CommandName 'chezmoi' -ScriptBlock ${__chezmoiCompleterBlock} > stdout 'Register-ArgumentCompleter' # test that chezmoi completion zsh generates zsh completions (0.822s) > exec chezmoi completion zsh [stdout] #compdef chezmoi compdef _chezmoi chezmoi # zsh completion for chezmoi -*- shell-script -*- __chezmoi_debug() { local file="$BASH_COMP_DEBUG_FILE" if [[ -n ${file} ]]; then echo "$*" >> "${file}" fi } _chezmoi() { local shellCompDirectiveError=1 local shellCompDirectiveNoSpace=2 local shellCompDirectiveNoFileComp=4 local shellCompDirectiveFilterFileExt=8 local shellCompDirectiveFilterDirs=16 local shellCompDirectiveKeepOrder=32 local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder local -a completions __chezmoi_debug "\n========= starting completion logic ==========" __chezmoi_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" # The user could have moved the cursor backwards on the command-line. # We need to trigger completion from the $CURRENT location, so we need # to truncate the command-line ($words) up to the $CURRENT location. # (We cannot use $CURSOR as its value does not work when a command is an alias.) words=("${=words[1,CURRENT]}") __chezmoi_debug "Truncated words[*]: ${words[*]}," lastParam=${words[-1]} lastChar=${lastParam[-1]} __chezmoi_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" # For zsh, when completing a flag with an = (e.g., chezmoi -n=) # completions must be prefixed with the flag setopt local_options BASH_REMATCH if [[ "${lastParam}" =~ '-.*=' ]]; then # We are dealing with a flag with an = flagPrefix="-P ${BASH_REMATCH}" fi # Prepare the command to obtain completions requestComp="${words[1]} __complete ${words[2,-1]}" if [ "${lastChar}" = "" ]; then # If the last parameter is complete (there is a space following it) # We add an extra empty parameter so we can indicate this to the go completion code. __chezmoi_debug "Adding extra empty parameter" requestComp="${requestComp} \"\"" fi __chezmoi_debug "About to call: eval ${requestComp}" # Use eval to handle any environment variables and such out=$(eval ${requestComp} 2>/dev/null) __chezmoi_debug "completion output: ${out}" # Extract the directive integer following a : from the last line local lastLine while IFS='\n' read -r line; do lastLine=${line} done < <(printf "%s\n" "${out[@]}") __chezmoi_debug "last line: ${lastLine}" if [ "${lastLine[1]}" = : ]; then directive=${lastLine[2,-1]} # Remove the directive including the : and the newline local suffix (( suffix=${#lastLine}+2)) out=${out[1,-$suffix]} else # There is no directive specified. Leave $out as is. __chezmoi_debug "No directive found. Setting do default" directive=0 fi __chezmoi_debug "directive: ${directive}" __chezmoi_debug "completions: ${out}" __chezmoi_debug "flagPrefix: ${flagPrefix}" if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then __chezmoi_debug "Completion received error. Ignoring completions." return fi local activeHelpMarker="_activeHelp_ " local endIndex=${#activeHelpMarker} local startIndex=$((${#activeHelpMarker}+1)) local hasActiveHelp=0 while IFS='\n' read -r comp; do # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then __chezmoi_debug "ActiveHelp found: $comp" comp="${comp[$startIndex,-1]}" if [ -n "$comp" ]; then compadd -x "${comp}" __chezmoi_debug "ActiveHelp will need delimiter" hasActiveHelp=1 fi continue fi if [ -n "$comp" ]; then # If requested, completions are returned with a description. # The description is preceded by a TAB character. # For zsh's _describe, we need to use a : instead of a TAB. # We first need to escape any : as part of the completion itself. comp=${comp//:/\\:} local tab="$(printf '\t')" comp=${comp//$tab/:} __chezmoi_debug "Adding completion: ${comp}" completions+=${comp} lastComp=$comp fi done < <(printf "%s\n" "${out[@]}") # Add a delimiter after the activeHelp statements, but only if: # - there are completions following the activeHelp statements, or # - file completion will be performed (so there will be choices after the activeHelp) if [ $hasActiveHelp -eq 1 ]; then if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then __chezmoi_debug "Adding activeHelp delimiter" compadd -x "--" hasActiveHelp=0 fi fi if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then __chezmoi_debug "Activating nospace." noSpace="-S ''" fi if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then __chezmoi_debug "Activating keep order." keepOrder="-V" fi if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then # File extension filtering local filteringCmd filteringCmd='_files' for filter in ${completions[@]}; do if [ ${filter[1]} != '*' ]; then # zsh requires a glob pattern to do file filtering filter="\*.$filter" fi filteringCmd+=" -g $filter" done filteringCmd+=" ${flagPrefix}" __chezmoi_debug "File filtering command: $filteringCmd" _arguments '*:filename:'"$filteringCmd" elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then # File completion for directories only local subdir subdir="${completions[1]}" if [ -n "$subdir" ]; then __chezmoi_debug "Listing directories in $subdir" pushd "${subdir}" >/dev/null 2>&1 else __chezmoi_debug "Listing directories in ." fi local result _arguments '*:dirname:_files -/'" ${flagPrefix}" result=$? if [ -n "$subdir" ]; then popd >/dev/null 2>&1 fi return $result else __chezmoi_debug "Calling _describe" if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then __chezmoi_debug "_describe found some completions" # Return the success of having called _describe return 0 else __chezmoi_debug "_describe did not find completions." __chezmoi_debug "Checking if we should do file completion." if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then __chezmoi_debug "deactivating file completion" # We must return an error code here to let zsh know that there were no # completions found by _describe; this is what will trigger other # matching algorithms to attempt to find completions. # For example zsh can match letters in the middle of words. return 1 else # Perform file completion __chezmoi_debug "Activating file completion" # We must return the result of this command, so it must be the # last command, or else we must store its result to return it. _arguments '*:filename:_files'" ${flagPrefix}" fi fi fi } # don't run the completion function when being source-ed or eval-ed if [ "$funcstack[1]" = "_chezmoi" ]; then _chezmoi fi > stdout '#compdef chezmoi' # test that --use-builtin flags are completed (0.892s) > exec chezmoi __complete --use-builtin [stdout] --use-builtin-age Use builtin age --use-builtin-git Use builtin git :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/use-builtin-flags # test that autoBool values are completed (2.154s) > exec chezmoi __complete --color t [stdout] t true :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/auto-bool-t # test that mode values are completed (1.857s) > exec chezmoi __complete --mode '' [stdout] file symlink :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/mode # test that write --format values are completed (0.649s) > exec chezmoi __complete state dump --format '' [stdout] json yaml :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/write-data # test that write --format values are completed (0.773s) > exec chezmoi __complete data --format '' [stdout] json yaml :4 [stderr] Completion ended with directive: ShellCompDirectiveNoFileComp > cmp stdout golden/write-data PASS === NAME TestScript/issue1161 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi does not follow symlinks in the source directory if the file should be ignored (1.913s) > symlink $CHEZMOISOURCEDIR/.HASH_dot_file -> non_existent_file > exec chezmoi status > rm $CHEZMOISOURCEDIR/.HASH_dot_file > exec chezmoi status # test that chezmoi does follow symlinks in the source directory if the file should not be ignored (5.182s) > symlink $CHEZMOISOURCEDIR/.chezmoifile -> non_existent_file > ! exec chezmoi status [stderr] chezmoi: stat $WORK/home/user/.local/share/chezmoi/.chezmoifile: no such file or directory [exit status 1] > [unix] stderr 'no such file or directory' > [windows] stderr 'The system cannot find the file specified' > rm $CHEZMOISOURCEDIR/.chezmoifile > exec chezmoi status PASS === NAME TestScript/ignore testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test that chezmoi apply does not write ignored files (1.026s) > ! exists $HOME/.file > exec chezmoi apply --force > exists $HOME/.file > ! exists $HOME/README.md > ! exists $HOME/.dir # test that chezmoi ignored lists the ignored entries (1.155s) > exec chezmoi ignored [stdout] .dir README.md > cmp stdout golden/ignored > chhome home2/user # test that chezmoi manage lists all managed files (1.255s) > exec chezmoi managed [stdout] .dir .dir/file.txt .dir/subdir .dir/subdir/file.txt .file.txt > cmp stdout golden/managed-all # test that chezmoiignore ignores all files in a directory (3.542s) > cp golden/.chezmoiignore-dir $CHEZMOISOURCEDIR/.chezmoiignore > exec chezmoi managed [stdout] .file.txt > cmp stdout golden/managed-ignore-dir # test that chezmoiignore ignores all files in a subdirectory (0.889s) > cp golden/.chezmoiignore-dir-subdir $CHEZMOISOURCEDIR/.chezmoiignore > exec chezmoi managed [stdout] .dir .dir/file.txt .file.txt > cmp stdout golden/managed-ignore-dir-subdir # test that chezmoiignore ignores all files matching a simple pattern (0.620s) > cp golden/.chezmoiignore-star-slash-star-dot-txt $CHEZMOISOURCEDIR/.chezmoiignore > exec chezmoi managed [stdout] .dir .dir/subdir .dir/subdir/file.txt .file.txt > cmp stdout golden/managed-ignore-star-slash-star-dot-txt # test that chezmoiignore ignores all files matching a doublestar pattern (0.511s) > cp golden/.chezmoiignore-star-star-slash-star-dot-txt $CHEZMOISOURCEDIR/.chezmoiignore > exec chezmoi managed [stdout] .dir .dir/subdir > cmp stdout golden/managed-ignore-star-star-slash-star-dot-txt PASS === NAME TestScript/config testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test default config (1.134s) > exec chezmoi data --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --format=yaml cacheDir: $WORK/home/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home/user/.config/chezmoi/chezmoi.toml executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: $WORK/home/user/.local/share/chezmoi uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:32Z" version: v2.0.0+test windowsVersion: {} workingTree: $WORK/home/user/.local/share/chezmoi > stdout 'sourceDir: .*/home/user/.local/share/chezmoi' # test that flags override default config (0.810s) > exec chezmoi data --format=yaml --source=/flag/source [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --format=yaml - --source=/flag/source cacheDir: $WORK/home/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home/user/.config/chezmoi/chezmoi.toml executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: /flag/source uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:33Z" version: v2.0.0+test windowsVersion: {} workingTree: /flag/source > stdout 'sourceDir: .*/flag/source' > chhome home2/user # test that flags override default config (0.828s) > exec chezmoi execute-template --source=/flag/source '{{ .chezmoi.sourceDir }}' [stdout] /flag/source> stdout /flag/source # test that config files override default config (0.977s) > exec chezmoi data --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --format=yaml cacheDir: $WORK/home2/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home2/user/.config/chezmoi/chezmoi.toml executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home2/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: /config/source uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:35Z" version: v2.0.0+test windowsVersion: {} workingTree: /config/source > stdout 'sourceDir: .*/config/source' # test that the config file can be set and can be in YAML format (2.139s) > exec chezmoi data --config=$HOME/.chezmoi.yaml --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --config=$WORK/home2/user/.chezmoi.yaml - --format=yaml cacheDir: $WORK/home2/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home2/user/.chezmoi.yaml executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home2/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: /config2/source uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:37Z" version: v2.0.0+test windowsVersion: {} workingTree: /config2/source > stdout 'sourceDir: .*/config2/source' # test that the config file can be in JSONC format (1.161s) > exec chezmoi data --config=$HOME/.chezmoi.jsonc --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --config=$WORK/home2/user/.chezmoi.jsonc - --format=yaml cacheDir: $WORK/home2/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home2/user/.chezmoi.jsonc executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home2/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: /config3/source uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:38Z" version: v2.0.0+test windowsVersion: {} workingTree: /config3/source > stdout 'sourceDir: .*/config3/source' # test that the cache directory can be set (1.133s) > exec chezmoi data --cache=/flag/cache --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --cache=/flag/cache - --format=yaml cacheDir: /flag/cache command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: $WORK/home2/user/.config/chezmoi/chezmoi.toml executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home2/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: /config/source uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:39Z" version: v2.0.0+test windowsVersion: {} workingTree: /config/source > stdout 'cacheDir: .*/flag/cache' > [windows] stop 'remaining tests require /dev/stdin' # test that chezmoi can read the config from stdin (0.872s) > stdin home2/user/.chezmoi.yaml > exec chezmoi data --config=/dev/stdin --config-format=yaml --format=yaml [stdout] chezmoi: arch: riscv64 args: - chezmoi - data - --config=/dev/stdin - --config-format=yaml - --format=yaml cacheDir: $WORK/home2/user/.cache/chezmoi command: data commandDir: $WORK config: add: encrypt: false secrets: warning templateSymlinks: false age: args: [] command: age identities: [] identity: {} passphrase: false recipient: "" recipients: [] recipientsFile: {} recipientsFiles: [] suffix: .age symmetric: false useBuiltin: false awsSecretsManager: profile: "" region: "" azureKeyVault: defaultVault: "" bitwarden: command: bw bitwardenSecrets: command: bws cacheDir: {} cd: args: [] command: "" color: {} completion: custom: false dashlane: args: [] command: dcli data: {} destDir: {} diff: args: [] command: "" exclude: [] pager: "\0" reverse: false scriptContents: true doppler: args: [] command: doppler config: "" project: "" edit: apply: false args: [] command: "" hardlink: true minDuration: 1s watch: false ejson: key: "" keyDir: /opt/ejson/keys encryption: "" env: {} format: yaml git: autoadd: false autocommit: false autopush: false command: git commitMessageTemplate: "" commitMessageTemplateFile: "" gitHub: refreshPeriod: 1m0s gopass: command: gopass gpg: args: [] command: gpg recipient: "" recipients: [] suffix: .asc symmetric: false hcpVaultSecrets: applicationName: "" args: [] command: vlt organizationId: "" projectId: "" hooks: {} interpreters: {} keepassxc: args: [] command: keepassxc-cli database: {} mode: cache-password prompt: true keeper: args: [] command: keeper lastpass: command: lpass merge: args: [] command: vimdiff mode: "" onepassword: command: op prompt: true pager: "" pass: command: pass passhole: args: [] command: ph prompt: true persistentState: {} pinentry: args: [] command: "" options: - allow-external-password-cache progress: {} rbw: command: rbw safe: true scriptEnv: {} scriptTempDir: {} secret: args: [] command: "" sourceDir: {} status: exclude: [] pathStyle: relative template: options: - missingkey=error textConv: [] umask: 18 update: apply: true args: [] command: "" recurseSubmodules: true useBuiltinAge: {} useBuiltinGit: {} vault: command: vault verbose: false verify: exclude: [] warnings: configFileTemplateHasChanged: true workingTree: {} configFile: /dev/stdin executable: /tmp/testscript-main3957720979/bin/chezmoi fqdnHostname: arch-nspawn-498843 gid: "1001" group: builduser homeDir: $WORK/home2/user hostname: arch-nspawn-498843 kernel: osrelease: 6.1.61-3-sophgo-multi-08357-g369f7207fe69 ostype: Linux version: '#1 SMP Sat, 30 Dec 2023 06:54:24 +0000' os: linux osRelease: ansiColor: 38;2;23;147;209 bugReportURL: https://gitlab.archlinux.org/groups/archlinux/-/issues buildID: rolling documentationURL: https://wiki.archlinux.org/ homeURL: https://archlinux.org/ id: arch logo: archlinux-logo name: Arch Linux prettyName: Arch Linux privacyPolicyURL: https://terms.archlinux.org/docs/privacy-policy/ supportURL: https://bbs.archlinux.org/ pathListSeparator: ':' pathSeparator: / sourceDir: /config2/source uid: "1001" username: builduser version: builtBy: testscript commit: HEAD date: "2024-02-12T14:22:40Z" version: v2.0.0+test windowsVersion: {} workingTree: /config2/source > stdout 'sourceDir: .*/config2/source' PASS === NAME TestScript/onepassword2 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/op > [windows] unix2dos bin/op.cmd # test onepassword template function (2.201s) > exec chezmoi execute-template '{{ (onepassword "ExampleLogin").id }}' [stdout] wxcplh5udshnonkzg2n4qx262y> stdout '^wxcplh5udshnonkzg2n4qx262y$' # test onepassword template function with vault and account (1.525s) > exec chezmoi execute-template '{{ (onepassword "ExampleLogin" "vault" "account").id }}' [stdout] wxcplh5udshnonkzg2n4qx262y> stdout '^wxcplh5udshnonkzg2n4qx262y$' # test onepassword template function with empty vault (1.621s) > exec chezmoi execute-template '{{ (onepassword "ExampleLogin" "" "account").id }}' [stdout] wxcplh5udshnonkzg2n4qx262y> stdout '^wxcplh5udshnonkzg2n4qx262y$' # test onepassword template function with account alias (1.040s) > exec chezmoi execute-template '{{ (onepassword "ExampleLogin" "" "chezmoi").id }}' [stdout] wxcplh5udshnonkzg2n4qx262y> stdout '^wxcplh5udshnonkzg2n4qx262y$' # test onepasswordDetailsFields template function (2.802s) > exec chezmoi execute-template '{{ (onepasswordDetailsFields "ExampleLogin").password.value }}' [stdout] L8rm1JXJIE1b8YUDWq7h> stdout '^L8rm1JXJIE1b8YUDWq7h$' # test onepasswordItemFields template function (0.727s) > exec chezmoi execute-template '{{ (onepasswordItemFields "ExampleLogin").exampleLabel.value }}' [stdout] exampleValue> stdout exampleValue # test onepasswordRead template function (0.982s) > exec chezmoi execute-template '{{ onepasswordRead "op://vault/item/field" }}' [stdout] exampleField > stdout exampleField # test onepasswordRead template function with account (0.512s) > exec chezmoi execute-template '{{ onepasswordRead "op://vault/item/field" "account" }}' [stdout] exampleAccountField > stdout exampleAccountField PASS === NAME TestScript/scriptonchange_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi apply runs onchange scripts the first time (4.487s) > mkdir $CHEZMOISOURCEDIR > cp golden/script-one.sh $CHEZMOISOURCEDIR/run_onchange_script.sh > exec chezmoi apply [stdout] one > stdout one > exec chezmoi state get --bucket=entryState --key=$HOME/script.sh [stdout] { "type": "script", "contentsSHA256": "a07f0271151ee0271ed379ebbddc5ef49d0f625417c8fe23254179e56f98d2df" } > cmp stdout golden/script-one-state.json # test that chezmoi apply does not run onchange scripts when their contents are not changed (1.100s) > exec chezmoi apply > ! stdout . # test that chezmoi status does not print that it will run onchange scripts when their contents are not changed (0.933s) > exec chezmoi status > ! stdout . # test that chezmoi status does print that it will run onchange scripts when their contents are changed (2.157s) > cp golden/script-two.sh $CHEZMOISOURCEDIR/run_onchange_script.sh > exec chezmoi status [stdout] R script.sh > cmp stdout golden/status # test that chezmoi apply runs onchange scripts when their contents are changed (2.074s) > exec chezmoi apply [stdout] two > stdout two > exec chezmoi state get --bucket=entryState --key=$HOME/script.sh [stdout] { "type": "script", "contentsSHA256": "7c8d714586cecf4f0ffb735ad10334df98428bc5282c0d0a6b78f5c074365159" } > cmp stdout golden/script-two-state.json # test that chezmoi apply runs onchange scripts when their contents are reverted to a previous state (1.361s) > cp golden/script-one.sh $CHEZMOISOURCEDIR/run_onchange_script.sh > exec chezmoi apply [stdout] one > stdout one > exec chezmoi state get --bucket=entryState --key=$HOME/script.sh [stdout] { "type": "script", "contentsSHA256": "a07f0271151ee0271ed379ebbddc5ef49d0f625417c8fe23254179e56f98d2df" } > cmp stdout golden/script-one-state.json PASS === NAME TestScript/forget testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip # FIXME make this test pass on windows > mksourcedir # test that chezmoi apply sets the state (6.410s) > exec chezmoi apply --force > exists $CHEZMOISOURCEDIR/dot_file > exec chezmoi state get --bucket=entryState --key=$WORK/home/user/.dir [stdout] { "type": "dir", "mode": 2147484141 } > [umask:002] cmp stdout golden/state-get-dir-umask-002.json > [umask:022] cmp stdout golden/state-get-dir-umask-022.json > exec chezmoi state get --bucket=entryState --key=$WORK/home/user/.file [stdout] { "type": "file", "mode": 420, "contentsSHA256": "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663" } > [umask:002] cmp stdout golden/state-get-file-umask-002.json > [umask:022] cmp stdout golden/state-get-file-umask-022.json # test that chezmoi forget forgets a dir (1.875s) > exists $CHEZMOISOURCEDIR/dot_dir > exec chezmoi forget --force $HOME${/}.dir > ! exists $CHEZMOISOURCEDIR/dot_dir > exec chezmoi state get --bucket=entryState --key=$WORK/home/user/.dir > ! stdout . # test that chezmoi forget forgets a file (1.209s) > exec chezmoi forget --force $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/dot_file > exec chezmoi state get --bucket=entryState --key=$WORK/home/user/.file > ! stdout . > chhome home2/user # test that chezmoi forget forgets a file when .chezmoiroot is used (0.472s) > exec chezmoi forget --force $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/home/dot_file PASS === NAME TestScript/status testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # FIXME add more tests (2.527s) > mkhomedir golden > mksourcedir # test that chezmoi status lists all files to be added (0.641s) > exec chezmoi status [stdout] A .create A .dir A .dir/file A .dir/subdir A .dir/subdir/file A .empty A .executable A .file A .private A .readonly A .symlink A .template > cmp stdout golden/status # test that the --path-style=absolute works as expected (0.809s) > [unix] exec chezmoi status --path-style=absolute [stdout] A $WORK/home/user/.create A $WORK/home/user/.dir A $WORK/home/user/.dir/file A $WORK/home/user/.dir/subdir A $WORK/home/user/.dir/subdir/file A $WORK/home/user/.empty A $WORK/home/user/.executable A $WORK/home/user/.file A $WORK/home/user/.private A $WORK/home/user/.readonly A $WORK/home/user/.symlink A $WORK/home/user/.template > [unix] cmpenv stdout golden/status-absolute-flag # test that chezmoi status lists all files to be added (1.109s) > exec chezmoi status [stdout] A .create A .dir A .dir/file A .dir/subdir A .dir/subdir/file A .empty A .executable A .file A .private A .readonly A .symlink A .template > cmp stdout golden/status # test that chezmoi status omits applied files (1.827s) > exec chezmoi apply --force $HOME${/}.file > exec chezmoi status [stdout] A .create A .dir A .dir/file A .dir/subdir A .dir/subdir/file A .empty A .executable A .private A .readonly A .symlink A .template > cmp stdout golden/status-except-dot-file # test that chezmoi status is empty after apply (3.194s) > exec chezmoi apply --force > exec chezmoi status > ! stdout . # test that chezmoi status identifies files that have been modified in the destination directory (0.859s) > edit $HOME/.file > exec chezmoi status [stdout] MM .file > cmp stdout golden/status-modified-file # test that chezmoi status does not emit status for equivalent modifications (0.629s) > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi status > ! stdout . # test that the pathStyle config option works as expected (0.642s) > [unix] chhome home2/user > [unix] mksourcedir > [unix] exec chezmoi status [stdout] A $WORK/home2/user/.create A $WORK/home2/user/.dir A $WORK/home2/user/.dir/file A $WORK/home2/user/.dir/subdir A $WORK/home2/user/.dir/subdir/file A $WORK/home2/user/.empty A $WORK/home2/user/.executable A $WORK/home2/user/.file A $WORK/home2/user/.private A $WORK/home2/user/.readonly A $WORK/home2/user/.symlink A $WORK/home2/user/.template > [unix] cmpenv stdout golden/status-absolute-config PASS === NAME TestScript/edit testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir # test that chezmoi edit edits a single file (3.177s) > exec chezmoi edit $HOME${/}.file [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit2567113087/.file: returned in less than 1s > grep -count=1 '# edited' $CHEZMOISOURCEDIR/dot_file > ! grep '# edited' $HOME/.file # test that chezmoi edit --apply applies the edit. (0.673s) > exec chezmoi edit --apply --force $HOME${/}.file [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit3008177395/.file: returned in less than 1s > grep -count=2 '# edited' $CHEZMOISOURCEDIR/dot_file > grep -count=2 '# edited' $HOME/.file # test that chezmoi edit edits a symlink (1.250s) > exec chezmoi edit $HOME${/}.symlink [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit2511268622/.symlink: returned in less than 1s > grep -count=1 '# edited' $CHEZMOISOURCEDIR/symlink_dot_symlink # test that chezmoi edit edits a script (1.625s) > exec chezmoi edit $HOME${/}script.sh [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit1639565219/script.sh: returned in less than 1s > grep -count=1 '# edited' $CHEZMOISOURCEDIR/run_script.sh # test that chezmoi edit edits a file and a symlink (1.049s) > exec chezmoi edit $HOME${/}.file $HOME${/}.symlink [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit2693860002/.file $WORK/.tmp/chezmoi-edit2693860002/.symlink: returned in less than 1s > grep -count=3 '# edited' $CHEZMOISOURCEDIR/dot_file > grep -count=2 '# edited' $CHEZMOISOURCEDIR/symlink_dot_symlink # test that chezmoi edit edits the working tree (0.959s) > exec chezmoi edit [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home/user/.local/share/chezmoi: returned in less than 1s > exists $CHEZMOISOURCEDIR/.edited # test that chezmoi edit edits a directory (0.663s) > [unix] exec chezmoi edit $HOME${/}.dir [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home/user/.local/share/chezmoi/dot_dir: returned in less than 1s > [unix] exists $CHEZMOISOURCEDIR/dot_dir/.edited > chhome home2/user # test that chezmoi edit edits a file when the working tree and the source dir are different (0.338s) > exec chezmoi edit $HOME${/}.file [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit349479319/.file: returned in less than 1s > grep -count=1 '# edited' $CHEZMOISOURCEDIR/home/dot_file # test that chezmoi edit edits the working tree when working tree and the source dir are different (0.371s) > exec chezmoi edit [stderr] chezmoi: warning: $WORK/bin/editor $WORK/home2/user/.local/share/chezmoi: returned in less than 1s > exists $CHEZMOISOURCEDIR/.edited > ! exists $CHEZMOISOURCEDIR/home/.edited PASS === NAME TestScript/scriptonce_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi status prints that it will run the script (0.990s) > exec chezmoi status [stdout] R script.sh > cmp stdout golden/status # test that chezmoi diff includes the script (1.153s) > exec chezmoi diff [stdout] diff --git a/script.sh b/script.sh new file mode 100755 index 0000000000000000000000000000000000000000..f9103e018df1bbc178e66b46d8f133f49c85225d --- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +pwd > cmp stdout golden/diff.diff # test that chezmoi apply runs the script (0.755s) > exec chezmoi apply --force [stdout] $WORK/home/user > stdout ${HOME@R} # test that the script is recorded in the state (0.908s) > exec chezmoi state dump [stdout] { "configState": {}, "entryState": { "$WORK/home/user/script.sh": { "contentsSHA256": "bb29fcd5733098d4e391d85d487d84d1d64cf42eae34b53951ae470b98c9ca8d", "type": "script" } }, "gitHubKeysState": {}, "gitHubLatestReleaseState": {}, "gitHubReleasesState": {}, "gitHubTagsState": {}, "gitRepoExternalState": {}, "scriptState": { "bb29fcd5733098d4e391d85d487d84d1d64cf42eae34b53951ae470b98c9ca8d": { "name": "script.sh", "runAt": "2024-02-12T14:22:34.398935298Z" } } } > stdout bb29fcd5733098d4e391d85d487d84d1d64cf42eae34b53951ae470b98c9ca8d # sha256sum of script contents # test that chezmoi diff no longer includes the script (2.327s) > exec chezmoi diff > ! stdout . # test that chezmoi status will not print that it will run the script (1.216s) > exec chezmoi status > ! stdout . # test that chezmoi apply does not run the script a second time and does not prompt (1.054s) > exec chezmoi apply > ! stdout ${HOME@R} # test that chezmoi apply after the script is modified runs the script a second time and does not prompt (0.573s) > edit $CHEZMOISOURCEDIR/run_once_script.sh > exec chezmoi apply [stdout] $WORK/home/user > stdout ${HOME@R} # test that resetting the state causes the next chezmoi apply to run the script (0.978s) > exec chezmoi state reset --force > exec chezmoi apply --force [stdout] $WORK/home/user > stdout ${HOME@R} PASS === NAME TestScript/script_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' # test that chezmoi status prints that it will run the script (0.693s) > exec chezmoi status [stdout] R script.sh > cmp stdout golden/status # test that chezmoi diff prints the script (1.471s) > exec chezmoi diff [stdout] diff --git a/script.sh b/script.sh new file mode 100755 index 0000000000000000000000000000000000000000..f9103e018df1bbc178e66b46d8f133f49c85225d --- /dev/null +++ b/script.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +pwd > cmp stdout golden/diff.diff # test that chezmoi diff --script-contents=false prints the script name but not its contents (0.619s) > exec chezmoi diff --script-contents=false [stdout] diff --git a/script.sh b/script.sh new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 --- /dev/null +++ b/script.sh > cmp stdout golden/diff-no-script-contents.diff # test that chezmoi apply runs the script (1.265s) > exec chezmoi apply --force [stdout] $WORK/home/user > stdout ${HOME@R} # test that chezmoi status prints that it will run the script again (1.696s) > exec chezmoi status [stdout] R script.sh > cmp stdout golden/status # test that chezmoi apply runs the script even if it has run before (1.785s) > exec chezmoi apply --force [stdout] $WORK/home/user > stdout ${HOME@R} # test that chezmoi dump includes the script (0.742s) > exec chezmoi dump [stdout] { "script.sh": { "type": "script", "name": "script.sh", "contents": "#!/bin/sh\n\npwd\n", "condition": "always" } } > cmp stdout golden/dump.json # test that chezmoi managed includes the script (0.510s) > exec chezmoi managed --include=scripts [stdout] script.sh > cmpenv stdout golden/managed # test that chezmoi cat writes the contents of the script (0.759s) > exec chezmoi cat $HOME${/}script.sh [stdout] #!/bin/sh pwd > cmp stdout golden/script.sh # test that chezmoi archive includes the script in the archive (0.517s) > exec chezmoi archive --format=tar --gzip --output=archive.tar.gz > exec tar -tzf archive.tar.gz [stdout] script.sh > cmp stdout golden/archive PASS === NAME TestScript/cd_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 bin/shell # test that chezmoi cd creates source directory if needed (1.227s) > exec chezmoi cd [stdout] shell > exists $CHEZMOISOURCEDIR > grep ${CHEZMOISOURCEDIR@R} pwd.log > rm pwd.log # test that chezmoi cd changes into an existing directory and sets the CHEZMOI environment variable (1.496s) > exec chezmoi cd [stdout] shell > grep CHEZMOI=1 env.log > rm env.log > grep ${CHEZMOISOURCEDIR@R} pwd.log > rm pwd.log # test chat chezmoi cd with an argument changes into the corresponding source directory (1.176s) > exec chezmoi cd $HOME${/}.dir [stdout] shell > grep ${CHEZMOISOURCEDIR@R}/dot_dir pwd.log > rm pwd.log # test that chezmoi cd works when $SHELL environment variable contains spaces (2.185s) > env SHELL='shell arg1' > exec chezmoi cd [stdout] shell arg1 > stdout '^shell arg1$' # test that chezmoi cd will not try to change to a non-directory (0.948s) > ! exec chezmoi cd $HOME${/}.file [stderr] chezmoi: $WORK/home/user/.local/share/chezmoi/dot_file: not a directory [exit status 1] > stderr 'not a directory' # test that cd will not try to change to a non-existent directory (2.345s) > ! exec chezmoi cd $HOME${/}.notexist [stderr] chezmoi: $WORK/home/user/.notexist: not managed [exit status 1] > stderr 'not managed' > chhome home2/user # test chezmoi cd with shell command set in config file overrides $SHELL environment variable (0.743s) > exec chezmoi cd [stdout] shell arg2 > stdout '^shell arg2$' > env SHELL=$WORK/bin/shell > chhome home3/user # test that chezmoi cd $HOME with .chezmoiroot changes into .chezmoiroot (0.894s) > exec chezmoi cd $HOME [stdout] shell > grep ${CHEZMOISOURCEDIR@R}/home pwd.log > rm pwd.log PASS === NAME TestScript/mergeencryptedgpg_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!exec:gpg] skip 'gpg not found in $PATH' > chmod 755 bin/edit-source > mkgpgconfig > appendline $CHEZMOICONFIGDIR/chezmoi.toml '[merge]' > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' command = "cat"' # test that chezmoi merge transparently decrypts the source (6.203s) > cp golden/source $HOME/.file > exec chezmoi add --encrypt $HOME${/}.file [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 > exec chezmoi chattr +template $HOME${/}.file > cp golden/destination $HOME/.file > exec chezmoi merge $HOME${/}.file [stdout] destination {{ "target" }} target [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 9FDFE1491D83FAB7, created 2024-02-12 "chezmoi-test-gpg-key" gpg: Warning: using insecure memory! > cmp stdout golden/expected > chhome home2/user > mkgpgconfig > appendline $CHEZMOICONFIGDIR/chezmoi.toml '[merge]' > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' command = "edit-source"' # test that chezmoi merge transparently re-encrypts the source if it is edited (3.057s) > cp golden/source $HOME/.file > exec chezmoi add --encrypt $HOME${/}.file [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 > exec chezmoi chattr +template $HOME${/}.file > cp golden/destination $HOME/.file > exec chezmoi merge $HOME${/}.file [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID A25FE2F43EB86C1A, created 2024-02-12 "chezmoi-test-gpg-key" gpg: Warning: using insecure memory! > exec chezmoi cat $HOME${/}.file [stdout] target # edited [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID A25FE2F43EB86C1A, created 2024-02-12 "chezmoi-test-gpg-key" > cmp stdout golden/edited-target PASS === NAME TestScript/diffcommand_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 bin/diff-pager # test that chezmoi diff invokes diff.command when configured (0.866s) > exec chezmoi diff [stdout] $WORK/home/user/.file $WORK/.tmp/chezmoi-diff4211806009/.file > stdout ^${HOME@R}/\.file\s+${WORK@R}/.*/\.file$ # test that chezmoi diff --use-builtin-diff uses the builtin diff even if diff.command is configured (1.123s) > exec chezmoi diff --use-builtin-diff [stdout] diff --git a/.file b/.file index bd729e8ee3cc005444c67dc77eed60016886b5e0..b508963510528ab709627ec448026a10a64c72ef 100644 --- a/.file +++ b/.file @@ -1 +1 @@ -# destination contents of .file +# target contents of .file > [umask:002] cmp stdout golden/diff-umask-002.diff > [umask:022] cmp stdout golden/diff-umask-022.diff # test that chezmoi diff --reverse reverses the order of arguments (0.722s) > exec chezmoi diff --reverse [stdout] $WORK/.tmp/chezmoi-diff1262254709/.file $WORK/home/user/.file > stdout ^${WORK@R}/.*/\.file\s+${HOME@R}/\.file$ # test that chezmoi apply --verbose uses diff.command (0.973s) > exec chezmoi apply --verbose [stdout] $WORK/home/user/.file $WORK/.tmp/chezmoi-diff672724628/.file > stdout ^${HOME@R}/\.file\s+${WORK@R}/.*/\.file$ > chhome home2/user # test that chezmoi diff appends the destination and target paths if diff.args does not contain any templates (1.546s) > exec chezmoi diff [stdout] arg $WORK/home2/user/.file $WORK/.tmp/chezmoi-diff266062890/.file > stdout ^arg\s+${HOME@R}/\.file\s+${WORK@R}/.*/\.file$ # test that chezmoi apply --verbose uses diff.command (1.897s) > exec chezmoi apply --verbose [stdout] arg $WORK/home2/user/.file $WORK/.tmp/chezmoi-diff3778881195/.file > stdout ^arg\s+${HOME@R}/\.file\s+${WORK@R}/.*/\.file$ > exists $HOME/.file > chhome home3/user # test that chezmoi diff ignores exit code 1 from diff.command if the files differ (0.732s) > exec chezmoi diff > chhome home4/user # test that chezmoi diff does not ignore exit code 2 from diff.command (0.617s) > ! exec chezmoi diff [stderr] chezmoi: exit status 2 [exit status 1] > stderr 'exit status 2' > chhome home5/user # test that chezmoi diff does not invoke diff.command for directories if directories are excluded (0.582s) > exec chezmoi diff [stdout] /dev/null $WORK/.tmp/chezmoi-diff374900033/.file > stdout \.file > ! stdout \.dir > chhome home6/user # test that chezmoi diff does not invoke the diff pager when there is no diff (0.666s) > exec chezmoi diff > ! stdout . # test that chezmoi diff does invoke the diff pager when there is a diff (0.536s) > cp golden/dot_file $CHEZMOISOURCEDIR > exec chezmoi diff [stdout] diff-pager > stdout diff-pager PASS === NAME TestScript/umask_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!umask:022] skip > chmod 777 $HOME/.file # test that chezmoi diff prints a diff when a file's permissions are different (1.208s) > exec chezmoi diff [stdout] diff --git a/.file b/.file old mode 100777 new mode 100644 > cmp stdout golden/diff # test that chezmoi verify fails when a file's permissions are different (1.080s) > ! exec chezmoi verify [exit status 1] # test that chezmoi apply updates file permissions (4.262s) > exec chezmoi apply --force > exec chezmoi diff > ! stdout . > exec chezmoi verify # test that chezmoi ignores incorrect permissions in the persistent state if the actual file permissions match and updates the persistent state (2.936s) > exec chezmoi state get --bucket=entryState --key=$HOME/.file [stdout] { "type": "file", "mode": 420, "contentsSHA256": "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663" } > cmp stdout golden/state-file-get.json > exec chezmoi state set --bucket=entryState --key=$HOME/.file --value={"type":"file","mode":436,"contentsSHA256":"634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663"} > exec chezmoi apply --verbose > ! stdout . > exec chezmoi state get --bucket=entryState --key=$HOME/.file [stdout] { "type": "file", "mode": 420, "contentsSHA256": "634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663" } > cmp stdout golden/state-file-get.json # test that chezmoi ignores incorrect permissions in the persistent state if the actual dir permissions match and updates the persistent state # chezmoi state get --bucket=entryState --key=$HOME/.dir # FIXME understand why un-commenting this and the next line causes the test to fail # cmp stdout golden/state-dir-get (1.062s) > exec chezmoi state set --bucket=entryState --key=$HOME/.dir --value={"type":"dir","mode":509} > exec chezmoi apply --verbose > ! stdout . > exec chezmoi state get --bucket=entryState --key=$HOME/.dir [stdout] { "type": "dir", "mode": 2147484141 } > cmp stdout golden/state-dir-get.json PASS === NAME TestScript/configstate testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi init creates a config file and updates the state (1.353s) > exec chezmoi init > cmp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi.toml > exec chezmoi state dump --format=yaml [stdout] configState: configState: configTemplateContentsSHA256: af43121a524340707b84e390f510c949731177e6f2a25b3b6b11b2fc656cf8f2 entryState: {} gitHubKeysState: {} gitHubLatestReleaseState: {} gitHubReleasesState: {} gitHubTagsState: {} gitRepoExternalState: {} scriptState: {} > cmp stdout golden/state-dump.yaml > ! stderr . # test that chezmoi apply succeeds (0.769s) > exec chezmoi apply > ! stderr . # test that chezmoi apply prints a warning if the config file template has been changed (0.910s) > cp golden/.chezmoi.toml.tmpl $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi apply [stderr] chezmoi: warning: config file template has changed, run chezmoi init to regenerate config file > stderr 'warning: config file template has changed' # test that chezmoi apply does not print the warning if it is suppressed (0.991s) > appendline $CHEZMOICONFIGDIR/chezmoi.toml '[warnings]' > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' configFileTemplateHasChanged = false' > exec chezmoi apply > ! stderr . > cp golden/chezmoi.toml $CHEZMOICONFIGDIR # test that chezmoi init re-generates the config file (2.593s) > exec chezmoi init > cmp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi.toml > ! stderr . # test that chezmoi apply no longer prints a warning after the config file is regenerated (1.097s) > exec chezmoi apply > ! stderr . # test that chezmoi apply --force ignores config file changes and updates the state (0.896s) > edit $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > grep '# edited' $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi apply --force > ! stderr . > ! grep '# edited' $CHEZMOICONFIGDIR/chezmoi.toml > chhome home2/user # test that chezmoi diff prints a warning when a config file template is added (1.365s) > exec chezmoi diff > ! stderr . > cp golden/chezmoi.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi diff [stderr] chezmoi: warning: config file template has changed, run chezmoi init to regenerate config file > stderr 'warning: config file template has changed' # test that chezmoi diff does not print a warning when the config file template is removed (0.600s) > rm $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi diff > ! stderr . PASS === NAME TestScript/autocommit testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > mkgitconfig > mkhomedir golden > mkhomedir > exec chezmoi init # test that chezmoi add creates and pushes a commit (1.702s) > exec chezmoi add $HOME${/}.file [stdout] [master (root-commit) a068130] Add .COMMIT_MESSAGE Add .file 2 files changed, 2 insertions(+) create mode 100644 .COMMIT_MESSAGE.tmpl create mode 100644 dot_file > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit a0681309e009685675125052f1cab7f7b925af1e Author: User Date: Mon Feb 12 22:22:34 2024 +0800 Add .COMMIT_MESSAGE Add .file diff --git a/.COMMIT_MESSAGE.tmpl b/.COMMIT_MESSAGE.tmpl new file mode 100644 index 0000000..996c784 --- /dev/null +++ b/.COMMIT_MESSAGE.tmpl @@ -0,0 +1 @@ +{{ .prefix }}my commit message file diff --git a/dot_file b/dot_file new file mode 100644 index 0000000..8a52cb9 --- /dev/null +++ b/dot_file @@ -0,0 +1 @@ +# contents of .file > stdout 'Add \.file' # test that chezmoi edit creates and pushes a commit (1.153s) > exec chezmoi edit $HOME${/}.file [stdout] [master a7c0f53] Update .file 1 file changed, 1 insertion(+) [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit615081752/.file: returned in less than 1s > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit a7c0f53a66d7c464041357145e1bfc76b78685a8 Author: User Date: Mon Feb 12 22:22:35 2024 +0800 Update .file diff --git a/dot_file b/dot_file index 8a52cb9..5d2730a 100644 --- a/dot_file +++ b/dot_file @@ -1 +1,2 @@ # contents of .file +# edited > stdout 'Update \.file' # test that chezmoi chattr creates and pushes a commit (1.271s) > exec chezmoi chattr +executable $HOME${/}.file [stdout] [master c9cd87c] Change attributes of .file 1 file changed, 0 insertions(+), 0 deletions(-) rename dot_file => executable_dot_file (100%) > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit c9cd87c2bf989bcb2f82237cdefdb126f98d5621 Author: User Date: Mon Feb 12 22:22:36 2024 +0800 Change attributes of .file diff --git a/dot_file b/executable_dot_file similarity index 100% rename from dot_file rename to executable_dot_file > stdout 'Change attributes of \.file' # test that chezmoi add on a directory creates and pushes a commit (1.537s) > exec chezmoi add $HOME${/}.dir [stdout] [master 395f82c] Add .dir/file Add .dir/subdir/file 2 files changed, 2 insertions(+) create mode 100644 dot_dir/file create mode 100644 dot_dir/subdir/file > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit 395f82cb0d15dbbbc28243bc807cf6f6767c2cd1 Author: User Date: Mon Feb 12 22:22:38 2024 +0800 Add .dir/file Add .dir/subdir/file diff --git a/dot_dir/file b/dot_dir/file new file mode 100644 index 0000000..501b590 --- /dev/null +++ b/dot_dir/file @@ -0,0 +1 @@ +# contents of .dir/file diff --git a/dot_dir/subdir/file b/dot_dir/subdir/file new file mode 100644 index 0000000..1be5724 --- /dev/null +++ b/dot_dir/subdir/file @@ -0,0 +1 @@ +# contents of .dir/subdir/file > stdout 'Add \.dir/file' # test that chezmoi chattr on a file in a directory creates and pushes a commit (1.392s) > exec chezmoi chattr --debug +private $HOME${/}.dir/file [stdout] [master d0c273b] Change attributes of .dir/file 1 file changed, 0 insertions(+), 0 deletions(-) rename dot_dir/{file => private_file} (100%) [stderr] time=2024-02-12T22:22:39.561+08:00 level=INFO msg=persistentPreRunRootE version.version=v2.0.0+test version.commit=HEAD version.date=2024-02-12T14:22:39Z version.builtBy=testscript args="[chezmoi chattr --debug +private $WORK/home/user/.dir/file]" goVersion=go1.22.0 time=2024-02-12T22:22:39.568+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:39.568+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi/.git time=2024-02-12T22:22:39.604+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiroot: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiroot size=0 data="" time=2024-02-12T22:22:39.613+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiversion: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiversion size=0 data="" time=2024-02-12T22:22:39.614+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:39.614+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:39.615+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:39.616+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_dir time=2024-02-12T22:22:39.617+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_dir/subdir time=2024-02-12T22:22:39.619+08:00 level=INFO msg=RemoveAll component=system oldpath=$WORK/home/user/.local/share/chezmoi/dot_dir/file newpath=$WORK/home/user/.local/share/chezmoi/dot_dir/private_file time=2024-02-12T22:22:39.620+08:00 level=INFO msg=Close component=persistentState time=2024-02-12T22:22:39.675+08:00 level=INFO msg=Run cmd="/usr/bin/git add ." duration=54.192577ms err= time=2024-02-12T22:22:39.677+08:00 level=INFO msg=RunCmd component=system cmd="/usr/bin/git add ." duration=56.718274ms err= time=2024-02-12T22:22:39.733+08:00 level=INFO msg=Output cmd="/usr/bin/git status --porcelain=v2" duration=54.158537ms size=152 output="2 R. N... 100644 100644 100644 501b5909d11c6dc3c6db4d66138f0297c..." err= time=2024-02-12T22:22:39.867+08:00 level=INFO msg=Run cmd="/usr/bin/git commit --message Change attributes of .dir/file\n" duration=106.457277ms err= time=2024-02-12T22:22:39.868+08:00 level=INFO msg=RunCmd component=system cmd="/usr/bin/git commit --message Change attributes of .dir/file\n" duration=107.297876ms err= > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit d0c273b8face0fc3b309e5c6cb5c3f081db60860 Author: User Date: Mon Feb 12 22:22:39 2024 +0800 Change attributes of .dir/file diff --git a/dot_dir/file b/dot_dir/private_file similarity index 100% rename from dot_dir/file rename to dot_dir/private_file > stdout 'Change attributes of \.dir' # test that chezmoi forget creates and pushes a commit (0.851s) > exec chezmoi forget --force $HOME${/}.file [stdout] [master ade20b2] Remove .file 1 file changed, 2 deletions(-) delete mode 100644 executable_dot_file > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit ade20b242936fb073ed125ead3ab4c71a2ea99e1 Author: User Date: Mon Feb 12 22:22:40 2024 +0800 Remove .file diff --git a/executable_dot_file b/executable_dot_file deleted file mode 100644 index 5d2730a..0000000 --- a/executable_dot_file +++ /dev/null @@ -1,2 +0,0 @@ -# contents of .file -# edited > stdout 'Remove \.file' # test that chezmoi edit uses a custom commit message template (0.593s) > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' commitMessageTemplate = "{{ .prefix }}my commit message"' > exec chezmoi edit $HOME${/}.dir${/}file [stdout] [master 9b582ed] feat: my commit message 1 file changed, 1 insertion(+) [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit2115707170/.dir/file: returned in less than 1s > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit 9b582ed7cb3822ad093a21c9b842140808907f11 Author: User Date: Mon Feb 12 22:22:41 2024 +0800 feat: my commit message diff --git a/dot_dir/private_file b/dot_dir/private_file index 501b590..047eb87 100644 --- a/dot_dir/private_file +++ b/dot_dir/private_file @@ -1 +1,2 @@ # contents of .dir/file +# edited > stdout 'feat: my commit message' # test that only one of git.commitMessageTemplate and git.commitMessageTemplateFile can be set (0.380s) > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' commitMessageTemplateFile = ".COMMIT_MESSAGE.tmpl"' > ! exec chezmoi edit $HOME${/}.dir${/}file [stderr] chezmoi: invalid config: $WORK/home/user/.config/chezmoi/chezmoi.toml: cannot specify both git.commitMessageTemplate and git.commitMessageTemplateFile [exit status 1] > stderr 'cannot specify both git.commitMessageTemplate and git.commitMessageTemplateFile' > removeline $CHEZMOICONFIGDIR/chezmoi.toml ' commitMessageTemplate = "{{ .prefix }}my commit message"' # test that chezmoi edit uses a custom commit message template file (0.511s) > exec chezmoi edit $HOME${/}.dir${/}file [stdout] [master 64389da] feat: my commit message file 1 file changed, 1 insertion(+) [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit3465593836/.dir/file: returned in less than 1s > exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD [stdout] commit 64389daee07b38d758828855f6ee2098a4a090f0 Author: User Date: Mon Feb 12 22:22:42 2024 +0800 feat: my commit message file diff --git a/dot_dir/private_file b/dot_dir/private_file index 047eb87..24bdc30 100644 --- a/dot_dir/private_file +++ b/dot_dir/private_file @@ -1,2 +1,3 @@ # contents of .dir/file # edited +# edited > stdout 'feat: my commit message file' > removeline $CHEZMOICONFIGDIR/chezmoi.toml ' commitMessageTemplateFile = ".COMMIT_MESSAGE.tmpl"' PASS === NAME TestScript/autopush testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > mkgitconfig > mkhomedir golden > mkhomedir # create a repo (3.249s) > exec git init --bare $WORK/dotfiles.git [stdout] Initialized empty Git repository in $WORK/dotfiles.git/ > exec chezmoi init file://$WORK/dotfiles.git [stderr] Cloning into '$WORK/home/user/.local/share/chezmoi'... warning: You appear to have cloned an empty repository. # test that chezmoi add creates and pushes a commit (2.340s) > exec chezmoi add $HOME${/}.file [stdout] [master (root-commit) a8ebaf8] Add .file 1 file changed, 1 insertion(+) create mode 100644 dot_file [stderr] To file://$WORK/dotfiles.git * [new branch] master -> master > exec git --git-dir=$WORK/dotfiles.git show HEAD [stdout] commit a8ebaf8dbee86758d5762bd3bc061f2f2a651f85 Author: User Date: Mon Feb 12 22:22:33 2024 +0800 Add .file diff --git a/dot_file b/dot_file new file mode 100644 index 0000000..8a52cb9 --- /dev/null +++ b/dot_file @@ -0,0 +1 @@ +# contents of .file > stdout 'Add \.file' # test that chezmoi edit creates and pushes a commit (1.639s) > exec chezmoi edit $HOME${/}.file [stdout] [master 68d5f94] Update .file 1 file changed, 1 insertion(+) [stderr] chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-edit2926267320/.file: returned in less than 1s To file://$WORK/dotfiles.git a8ebaf8..68d5f94 master -> master > exec git --git-dir=$WORK/dotfiles.git show HEAD [stdout] commit 68d5f9468dcabf54cdb76f86cc2325c719124bfb Author: User Date: Mon Feb 12 22:22:35 2024 +0800 Update .file diff --git a/dot_file b/dot_file index 8a52cb9..5d2730a 100644 --- a/dot_file +++ b/dot_file @@ -1 +1,2 @@ # contents of .file +# edited > stdout 'Update \.file' # test that chezmoi chattr on a file creates and pushes a commit (1.428s) > exec chezmoi chattr +executable $HOME${/}.file [stdout] [master 10fbe0a] Change attributes of .file 1 file changed, 0 insertions(+), 0 deletions(-) rename dot_file => executable_dot_file (100%) [stderr] To file://$WORK/dotfiles.git 68d5f94..10fbe0a master -> master > exec git --git-dir=$WORK/dotfiles.git show HEAD [stdout] commit 10fbe0aba56bc20dba0d641fc9c85f357441e3dd Author: User Date: Mon Feb 12 22:22:37 2024 +0800 Change attributes of .file diff --git a/dot_file b/executable_dot_file similarity index 100% rename from dot_file rename to executable_dot_file > stdout 'Change attributes of \.file' # test that chezmoi add on a directory creates and pushes a commit (3.304s) > exec chezmoi add $HOME${/}.dir [stdout] [master 5646e47] Add .dir/file Add .dir/subdir/file 2 files changed, 2 insertions(+) create mode 100644 dot_dir/file create mode 100644 dot_dir/subdir/file [stderr] To file://$WORK/dotfiles.git 10fbe0a..5646e47 master -> master > exec git --git-dir=$WORK/dotfiles.git show HEAD [stdout] commit 5646e47cac20931db15fca9c9243c9a5d4f6f402 Author: User Date: Mon Feb 12 22:22:40 2024 +0800 Add .dir/file Add .dir/subdir/file diff --git a/dot_dir/file b/dot_dir/file new file mode 100644 index 0000000..501b590 --- /dev/null +++ b/dot_dir/file @@ -0,0 +1 @@ +# contents of .dir/file diff --git a/dot_dir/subdir/file b/dot_dir/subdir/file new file mode 100644 index 0000000..1be5724 --- /dev/null +++ b/dot_dir/subdir/file @@ -0,0 +1 @@ +# contents of .dir/subdir/file > stdout 'Add \.dir/file' # test that chezmoi chattr on a file in a directory creates and pushes a commit (0.937s) > exec chezmoi chattr --debug +private $HOME${/}.dir/file [stdout] [master b3a0a9a] Change attributes of .dir/file 1 file changed, 0 insertions(+), 0 deletions(-) rename dot_dir/{file => private_file} (100%) [stderr] time=2024-02-12T22:22:41.441+08:00 level=INFO msg=persistentPreRunRootE version.version=v2.0.0+test version.commit=HEAD version.date=2024-02-12T14:22:41Z version.builtBy=testscript args="[chezmoi chattr --debug +private $WORK/home/user/.dir/file]" goVersion=go1.22.0 time=2024-02-12T22:22:41.456+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:41.456+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi/.git time=2024-02-12T22:22:41.478+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiroot: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiroot size=0 data="" time=2024-02-12T22:22:41.482+08:00 level=ERROR msg=ReadFile component=system err="open $WORK/home/user/.local/share/chezmoi/.chezmoiversion: no such file or directory" name=$WORK/home/user/.local/share/chezmoi/.chezmoiversion size=0 data="" time=2024-02-12T22:22:41.483+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:41.484+08:00 level=INFO msg=Stat component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:41.485+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi time=2024-02-12T22:22:41.485+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_dir time=2024-02-12T22:22:41.486+08:00 level=INFO msg=ReadDir component=system name=$WORK/home/user/.local/share/chezmoi/dot_dir/subdir time=2024-02-12T22:22:41.487+08:00 level=INFO msg=RemoveAll component=system oldpath=$WORK/home/user/.local/share/chezmoi/dot_dir/file newpath=$WORK/home/user/.local/share/chezmoi/dot_dir/private_file time=2024-02-12T22:22:41.488+08:00 level=INFO msg=Close component=persistentState time=2024-02-12T22:22:41.518+08:00 level=INFO msg=Run cmd="/usr/bin/git add ." duration=29.478846ms err= time=2024-02-12T22:22:41.518+08:00 level=INFO msg=RunCmd component=system cmd="/usr/bin/git add ." duration=30.238085ms err= time=2024-02-12T22:22:41.558+08:00 level=INFO msg=Output cmd="/usr/bin/git status --porcelain=v2" duration=38.743295ms size=152 output="2 R. N... 100644 100644 100644 501b5909d11c6dc3c6db4d66138f0297c..." err= time=2024-02-12T22:22:41.657+08:00 level=INFO msg=Run cmd="/usr/bin/git commit --message Change attributes of .dir/file\n" duration=80.568966ms err= time=2024-02-12T22:22:41.658+08:00 level=INFO msg=RunCmd component=system cmd="/usr/bin/git commit --message Change attributes of .dir/file\n" duration=81.022866ms err= To file://$WORK/dotfiles.git 5646e47..b3a0a9a master -> master time=2024-02-12T22:22:41.895+08:00 level=INFO msg=Run cmd="/usr/bin/git push" duration=236.229387ms err= time=2024-02-12T22:22:41.895+08:00 level=INFO msg=RunCmd component=system cmd="/usr/bin/git push" duration=236.704926ms err= > exec git --git-dir=$WORK/dotfiles.git show HEAD [stdout] commit b3a0a9a38b9ac63f9f28b71d6a845d7c7790fe86 Author: User Date: Mon Feb 12 22:22:41 2024 +0800 Change attributes of .dir/file diff --git a/dot_dir/file b/dot_dir/private_file similarity index 100% rename from dot_dir/file rename to dot_dir/private_file > stdout 'Change attributes of \.dir' # test that chezmoi forget creates and pushes a commit (0.479s) > exec chezmoi forget --force $HOME${/}.file [stdout] [master e8d6e84] Remove .file 1 file changed, 2 deletions(-) delete mode 100644 executable_dot_file [stderr] To file://$WORK/dotfiles.git b3a0a9a..e8d6e84 master -> master > exec git --git-dir=$WORK/dotfiles.git show HEAD [stdout] commit e8d6e84f2192c6ea1c56ef5a584894d9dd2b9de1 Author: User Date: Mon Feb 12 22:22:42 2024 +0800 Remove .file diff --git a/executable_dot_file b/executable_dot_file deleted file mode 100644 index 5d2730a..0000000 --- a/executable_dot_file +++ /dev/null @@ -1,2 +0,0 @@ -# contents of .file -# edited > stdout 'Remove \.file' PASS === NAME TestScript/externalgitrepo testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!exec:git] skip 'git not found in $PATH' > mkgitconfig > expandenv $WORK/home/user/.local/share/chezmoi/.chezmoiexternal.toml # test that chezmoi managed lists the directory (2.204s) > exec chezmoi managed [stdout] .dir > stdout ^\.dir$ # create a git repo (0.404s) > cd $WORK/repo $WORK/repo > exec git init [stdout] Initialized empty Git repository in $WORK/repo/.git/ > exec git add . > exec git commit --message 'initial commit' [stdout] [master (root-commit) 08695d9] initial commit 1 file changed, 1 insertion(+) create mode 100644 .file > cd $WORK $WORK # test that chezmoi apply clones the git repo (1.897s) > exec chezmoi apply [stderr] Cloning into '$WORK/home/user/.dir'... > cmp $HOME/.dir/.file golden/.file # test that chezmoi archive --format=tar creates an archive (2.486s) > exec chezmoi archive --format=tar [stdout] # test that chezmoi archive --format=zip creates an archive (0.939s) > exec chezmoi archive --format=zip [stdout] PK> chhome home2/user > mkgitconfig > expandenv $WORK/home2/user/.local/share/chezmoi/.chezmoiexternal.toml # test that chezmoi apply clones the git repo (2.544s) > exec chezmoi apply [stderr] Cloning into '$WORK/home2/user/.dir'... > cmp $HOME/.dir/.file golden/.file # update the git repo (0.136s) > cd $WORK/repo $WORK/repo > edit $WORK/repo/.file > exec git commit --message 'edit .file' . [stdout] [master 1565e70] edit .file 1 file changed, 1 insertion(+) > cd $WORK $WORK > chhome home/user # test that chezmoi apply does not pull from the git repo when refreshPeriod is zero (0.589s) > exec chezmoi apply > ! grep '# edited' $HOME/.dir/.file # test that chezmoi apply --refresh-externals does pull from the git repo (1.036s) > exec chezmoi apply --refresh-externals [stdout] Updating 08695d9..1565e70 Fast-forward .file | 1 + 1 file changed, 1 insertion(+) [stderr] From file://$WORK/repo 08695d9..1565e70 master -> origin/master > grep '# edited' $HOME/.dir/.file > chhome home2/user # test that chezmoi apply does not pull from the git repo within the refresh period (0.483s) > exec chezmoi apply > ! grep '# edited' $HOME/.dir/.file # test that chezmoi dump prints the git command (0.328s) > exec chezmoi dump --format=yaml [stdout] $WORK/home2/user/.dir: type: command path: /usr/bin/git args: - git - pull > stdout 'type: command' PASS === NAME TestScript/gpgencryptionsymmetric testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'skipping gpg tests on Windows' > [!exec:gpg] skip 'gpg not found in $PATH' > mkhomedir > mkgpgconfig -symmetric # test that chezmoi add --encrypt encrypts (1.314s) > cp golden/.encrypted $HOME > exec chezmoi add --encrypt $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! > exists $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc > grep '-----BEGIN PGP MESSAGE-----' $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc # test that chezmoi apply decrypts (0.964s) > rm $HOME/.encrypted > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase > cmp golden/.encrypted $HOME/.encrypted # test that chezmoi apply --exclude=encrypted does not apply encrypted files (4.822s) > rm $HOME/.encrypted > exec chezmoi apply --exclude=encrypted --force > ! exists $HOME/.encrypted > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase > cmp $HOME/.encrypted golden/.encrypted # test that chezmoi detects gpg encryption if gpg is configured but encryption = "gpg" is not set (0.828s) > removeline $CHEZMOICONFIGDIR/chezmoi.toml 'encryption = "gpg"' > exec chezmoi cat $HOME${/}.encrypted [stdout] # contents of .encrypted [stderr] gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase > cmp stdout golden/.encrypted # test that chezmoi edit --apply transparently decrypts and re-encrypts (0.893s) > exec chezmoi edit --apply --force $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-encrypted2331984663/.encrypted: returned in less than 1s gpg: Warning: using insecure memory! gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase > grep '# edited' $HOME/.encrypted # test that chezmoi files in subdirectories can be encrypted and that suffix can be set (1.232s) > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' suffix = ".gpg"' > mkdir $HOME/.dir > cp golden/.encrypted $HOME/.dir > exec chezmoi add --encrypt $HOME${/}.dir${/}.encrypted [stderr] gpg: Warning: using insecure memory! > grep '-----BEGIN PGP MESSAGE-----' $CHEZMOISOURCEDIR/dot_dir/encrypted_dot_encrypted.gpg > exec chezmoi edit --apply $HOME${/}.dir${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-encrypted1061424791/.dir/.encrypted: returned in less than 1s gpg: Warning: using insecure memory! gpg: Warning: using insecure memory! gpg: AES256.CFB encrypted data gpg: encrypted with 1 passphrase > grep '# edited' $HOME/.dir/.encrypted PASS === NAME TestScript/builtingit testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > [windows] skip 'go-git does not support file:// URLs on windows' > chmod 755 golden/git > mkgitconfig > mkhomedir golden > mkhomedir # install fake git (2.110s) > cp golden/git bin > ! exec chezmoi init [stderr] chezmoi: exit status 1 [exit status 1] > exec chezmoi init --use-builtin-git=true > exists $CHEZMOISOURCEDIR/.git # create a commit (1.953s) > rm bin/git # disable fake git > cp golden/.file $CHEZMOISOURCEDIR/dot_file > exec chezmoi git add dot_file > exec chezmoi git commit -- --message 'Add dot_file' [stdout] [master (root-commit) bdd1863] Add dot_file 1 file changed, 1 insertion(+) create mode 100644 dot_file > cp golden/git bin # restore fake git > chhome home2/user # test chezmoi init --use-builtin-git=true (2.875s) > exec chezmoi init --use-builtin-git=true file://$WORK/home/user/.local/share/chezmoi > exists $CHEZMOISOURCEDIR/.git > cmp $CHEZMOISOURCEDIR/dot_file golden/.file > chhome home/user # create a second commit (1.323s) > rm bin/git # disable fake git > cp golden/.executable $CHEZMOISOURCEDIR/executable_dot_executable > exec chezmoi git add executable_dot_executable > exec chezmoi git commit -- --message 'Add executable_dot_executable' [stdout] [master 2e8596d] Add executable_dot_executable 1 file changed, 1 insertion(+) create mode 100755 executable_dot_executable > cp golden/git bin # restore fake git > chhome home2/user # test chezmoi update --use-builtin-git=true (1.275s) > ! exec chezmoi update [stderr] chezmoi: exit status 1 [exit status 1] > exec chezmoi update --use-builtin-git=true > cmp $CHEZMOISOURCEDIR/executable_dot_executable golden/.executable > chhome home/user # test chezmoi init --branch --use-builtin-git=true (1.683s) > rm bin/git # disable fake git > exec chezmoi git checkout -- -b new-branch [stderr] Switched to a new branch 'new-branch' > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi git add dot_file > exec chezmoi git commit -- --message 'Edit .file' [stdout] [new-branch 6c82c49] Edit .file 1 file changed, 1 insertion(+) > exec chezmoi git checkout master [stderr] Switched to branch 'master' > cp golden/git bin # restore fake git > chhome home3/user # test chezmoi init --apply --branch=new-branch --use-builtin-git=true (0.645s) > exec chezmoi init --apply --branch=new-branch --use-builtin-git=true file://$WORK/home/user/.local/share/chezmoi > grep '# edited' $HOME/.file PASS === NAME TestScript/age testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi age encrypt encrypts a file with a passphrase (6.211s) > stdin $HOME/passphrases > exec chezmoi age encrypt --output $HOME${/}secret.txt.age --passphrase --no-tty $HOME${/}secret.txt [stdout] Enter passphrase: Confirm passphrase: > grep '-----BEGIN AGE ENCRYPTED FILE----' $HOME/secret.txt.age # test that chezmoi age decrypt decrypts a file with a passphrase (6.370s) > stdin $HOME/passphrase > exec chezmoi age decrypt --output $HOME${/}secret.txt.decrypted --passphrase --no-tty $HOME${/}secret.txt.age [stdout] Enter passphrase: > cmp $HOME/secret.txt.decrypted $HOME/secret.txt PASS === NAME TestScript/modify_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > [!exec:sed] skip 'sed not found in $PATH' > [!umask:022] skip 'unsupported umask' > cp golden/.modify home/user # test that chezmoi cat prints the modified contents without modifying the file (1.639s) > exec chezmoi cat $HOME${/}.modify [stdout] beginning modified-middle end > cmp stdout golden/.modified > cmp home/user/.modify golden/.modify # test that chezmoi diff prints the diff without modifying the file (0.835s) > exec chezmoi diff [stdout] diff --git a/.modify b/.modify index f91830d4ecd80adfe9a6aea9dca579397aa86921..6b6d41aae5e8d64a54afd8b8ad5a38a3de1e1e35 100644 --- a/.modify +++ b/.modify @@ -1,3 +1,3 @@ beginning -middle +modified-middle end > cmp stdout golden/diff.diff > cmp home/user/.modify golden/.modify # test that chezmoi archive includes the modified file (1.267s) > exec chezmoi archive --output=archive.tar > exec tar xf archive.tar [stderr] /usr/bin/tar: .modify: time stamp 2024-02-12 22:22:35 is 0.335990509 s in the future > cmp .modify golden/.modified > cmp home/user/.modify golden/.modify # test that chezmoi apply modifies the file (1.021s) > exec chezmoi apply --force > cmp home/user/.modify golden/.modified > chhome home2/user # test that chezmoi cat does not fail or generate output when the target does not exist (1.132s) > exec chezmoi cat $HOME${/}.not_exist > ! stdout . # test that chezmoi cat exits with an error when the modify script fails (2.494s) > ! exec chezmoi cat $HOME${/}.error [stderr] chezmoi: .error: exit status 1 [exit status 1] > stderr error # test that chezmoi apply updates file permissions (0.610s) > cmpmod 666 $HOME/.file > exec chezmoi apply $HOME${/}.file > cmpmod 700 $HOME/.file > chhome home3/user # test that chezmoi apply always overwrites modified files without --force (1.847s) > exec chezmoi add $HOME${/}.modify > exec chezmoi apply > edit $HOME${/}.modify > rm $CHEZMOISOURCEDIR/dot_modify > cp home/user/.local/share/chezmoi/modify_dot_modify $CHEZMOISOURCEDIR > exec chezmoi apply > cmp $HOME${/}.modify golden/.edited-and-modified > chhome home4/user # test that modify scripts can be templates (0.739s) > exec chezmoi cat $HOME${/}.modify [stdout] beginning modified-middle end > cmp stdout golden/.modified > chhome home5/user # test that modify scripts can be modify-templates (0.569s) > exec chezmoi cat $HOME${/}.modify [stdout] beginning modified-middle end > cmp stdout golden/.modified > chhome home6/user # test that modify scripts can use modify-templates to modify JSON fields (0.475s) > exec chezmoi apply --force > cmp $HOME/.modify.json golden/.modified.json PASS === NAME TestScript/inittemplatefuncs testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test exit template function (3.174s) > exec chezmoi execute-template --init '{{ exit 0 }}' > ! exec chezmoi execute-template --init '{{ exit 1 }}' [exit status 1] # test promptBoolOnce template function with execute-template --init (2.127s) > exec chezmoi execute-template --init --promptBool bool=true '{{ promptBoolOnce . "bool" "bool" }}' [stdout] true> stdout true # test promptChoiceOnce template function with execute-template --init (1.447s) > exec chezmoi execute-template --init --promptChoice choice=one '{{ promptChoiceOnce . "choice" "choice" (list "one" "two" "three") }}' [stdout] one> stdout one # test promptIntOnce template function with execute-template --init (0.897s) > exec chezmoi execute-template --init --promptInt int=1 '{{ promptIntOnce . "int" "int" }}' [stdout] 1> stdout 1 # test promptStringOnce template function with execute-template --init (0.445s) > exec chezmoi execute-template --init --promptString string=value '{{ promptStringOnce . "string" "string" }}' [stdout] value> stdout value # test writeToStdout template function (0.427s) > exec chezmoi execute-template --init '{{ writeToStdout "string" }}' [stdout] string> stdout string # test prompt*Once functions without existing data (0.619s) > stdin golden/input > exec chezmoi init --no-tty [stdout] bool? int? string? > cmp ${CHEZMOICONFIGDIR}/chezmoi.toml golden/chezmoi.toml > chhome home2/user # test prompt*Once functions with existing data (0.541s) > exec chezmoi init > cmp ${CHEZMOICONFIGDIR}/chezmoi.toml golden/chezmoi.toml > chhome home3/user # test prompt*Once functions with existing data and nested keys (0.399s) > exec chezmoi init > cmp ${CHEZMOICONFIGDIR}/chezmoi.toml golden/chezmoi.toml PASS === NAME TestScript/diff testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!umask:022] skip > mkhomedir golden > mkhomedir > mksourcedir # test that chezmoi diff generates no output when the source and destination states are equal (1.066s) > exec chezmoi diff > ! stdout . # test that chezmoi diff generates a diff when a file is added to the source state (0.673s) > cp golden/dot_newfile $CHEZMOISOURCEDIR/dot_newfile > exec chezmoi diff [stdout] diff --git a/.newfile b/.newfile new file mode 100644 index 0000000000000000000000000000000000000000..06e05235fdd12fd5c367b6d629fef94536c85525 --- /dev/null +++ b/.newfile @@ -0,0 +1 @@ +# contents of .newfile > [unix] cmp stdout golden/add-newfile-diff-unix.diff > [windows] cmp stdout golden/add-newfile-diff-windows.diff > rm $CHEZMOISOURCEDIR/dot_newfile # test that chezmoi diff generates a diff when a file is edited (2.067s) > edit $HOME/.file > exec chezmoi diff [stdout] diff --git a/.file b/.file index 5d2730a8850a2db479af83de87cc8345437aef06..8a52cb9ce9551221716a53786ad74104c5902362 100644 --- a/.file +++ b/.file @@ -1,2 +1 @@ # contents of .file -# edited > [unix] cmp stdout golden/modify-file-diff-unix.diff > [windows] cmp stdout golden/modify-file-diff-windows.diff > exec chezmoi apply --force $HOME${/}.file # test chezmoi diff --reverse (3.445s) > edit $HOME/.file > exec chezmoi diff --reverse [stdout] diff --git a/.file b/.file index 8a52cb9ce9551221716a53786ad74104c5902362..5d2730a8850a2db479af83de87cc8345437aef06 100644 --- a/.file +++ b/.file @@ -1 +1,2 @@ # contents of .file +# edited > [unix] cmp stdout golden/modify-file-diff-reverse-unix.diff > [windows] cmp stdout golden/modify-file-diff-reverse-windows.diff > exec chezmoi apply --force $HOME${/}.file # test that chezmoi diff generates a diff when a file is removed from the destination directory (1.971s) > rm $HOME/.file > exec chezmoi diff [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file > [unix] cmp stdout golden/restore-file-diff-unix.diff > [windows] cmp stdout golden/restore-file-diff-windows.diff > exec chezmoi apply --force $HOME${/}.file # test that chezmoi diff generates a diff when a directory is removed from the destination directory (0.990s) > rm $HOME/.dir > exec chezmoi diff --recursive=false $HOME${/}.dir [stdout] diff --git a/.dir b/.dir new file mode 40755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 --- /dev/null +++ b/.dir > [unix] cmp stdout golden/restore-dir-diff-unix.diff > [windows] cmp stdout golden/restore-dir-diff-windows.diff > exec chezmoi apply --force $HOME${/}.dir # test that chezmoi diff generates a diff when the actual state is a file and the target state is a symlink (0.508s) > rm $HOME/.symlink > cp golden/.file $HOME/.symlink > exec chezmoi diff [stdout] diff --git a/.symlink b/.symlink deleted file mode 100644 index 8a52cb9ce9551221716a53786ad74104c5902362..0000000000000000000000000000000000000000 --- a/.symlink +++ /dev/null @@ -1 +0,0 @@ -# contents of .file diff --git a/.symlink b/.symlink old mode 100644 new mode 120000 index 8a52cb9ce9551221716a53786ad74104c5902362..9b91fdbb83798a67fbbc5cc4f120c3f7726c0d70 --- a/.symlink +++ b/.symlink @@ -1 +1 @@ -# contents of .file +.dir/subdir/file > [unix] cmp stdout golden/symlink-file-diff-unix.diff # [windows] cmp stdout golden/symlink-file-diff-windows # FIXME (0.488s) > exec chezmoi apply --force $HOME${/}.symlink > [windows] stop 'remaining tests use file modes' # test that chezmoi diff generates a diff when a file's permissions are changed (0.907s) > chmod 777 $HOME/.file > exec chezmoi diff [stdout] diff --git a/.file b/.file old mode 100777 new mode 100644 > cmp stdout golden/chmod-file-diff.diff > exec chezmoi apply --force $HOME${/}.file # test that chezmoi diff generates a diff when a directory's permissions are changed (0.747s) > chmod 700 $HOME/.dir > exec chezmoi diff [stdout] diff --git a/.dir b/.dir old mode 40700 new mode 40755 > cmp stdout golden/chmod-dir-diff.diff > exec chezmoi apply --force --recursive=false $HOME${/}.dir PASS === NAME TestScript/doppler testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/doppler > [windows] unix2dos bin/doppler.cmd # test doppler template function (global configuration) (1.435s) > exec chezmoi execute-template '{{ doppler "PASSWORD_123"}}' [stdout] staplebatteryhorsecorrect> stdout ^staplebatteryhorsecorrect$ # test doppler template function with project and config arguments (supplied configuration) (0.728s) > exec chezmoi execute-template '{{ doppler "PASSWORD" "project" "config" }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ # test doppler template function with empty project and config arguments (global configuration) (1.266s) > exec chezmoi execute-template '{{ doppler "PASSWORD" "" "" }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ # test dopplerProjectJson template function with project and config arguments (supplied configuration) (1.707s) > exec chezmoi execute-template '{{ (dopplerProjectJson "project" "config").PASSWORD_123 }}' [stdout] staplebatteryhorsecorrect> stdout ^staplebatteryhorsecorrect$ # test dopplerProjectJson template function with JSON secret piped to fromJson function, project and config arguments (1.989s) > exec chezmoi execute-template '{{ ((dopplerProjectJson "project" "config").JSON_SECRET | fromJson).created_by.email }}' [stdout] user@example.com> stdout ^user@example\.com$ # test dopplerProjectJson template function with project and empty config arguments (global configuration) (0.613s) > exec chezmoi execute-template '{{ (dopplerProjectJson "project" "").PASSWORD }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ # test dopplerProjectJson template function with empty project and empty config arguments (global configuration) (0.816s) > exec chezmoi execute-template '{{ (dopplerProjectJson "" "").PASSWORD }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ # test dopplerProjectJson template function without project and config arguments (global configuration) (0.658s) > exec chezmoi execute-template '{{ dopplerProjectJson.PASSWORD }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ > chhome home3/user # test doppler template function with default project and config arguments (chezmoi configuration) (0.725s) > exec chezmoi execute-template '{{ doppler "PASSWORD" }}' [stdout] default-project-password> stdout ^default-project-password$ # test doppler template function with project and default config arguments (chezmoi configuration) (0.410s) > exec chezmoi execute-template '{{ doppler "PASSWORD" "other-project" }}' [stdout] other-project-password> stdout ^other-project-password$ # test doppler template function with project and default config arguments (supplied configuration) (0.339s) > exec chezmoi execute-template '{{ doppler "PASSWORD" "project" "config" }}' [stdout] correcthorsebatterystaple> stdout ^correcthorsebatterystaple$ # test dopplerProjectJson template function with project and default config arguments (chezmoi configuration) (0.345s) > exec chezmoi execute-template '{{ (dopplerProjectJson "default-project").DOPPLER_CONFIG }}' [stdout] default-config> stdout ^default-config$ # test dopplerProjectJson template function with default project and config arguments (chezmoi configuration) (0.436s) > exec chezmoi execute-template '{{ (dopplerProjectJson).DOPPLER_PROJECT }}' [stdout] default-project> stdout ^default-project$ PASS === NAME TestScript/external testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > symlink archive/dir/symlink -> file > [darwin] exec xattr -w -s io.chezmoi.test metadata-test archive/dir archive/dir/symlink archive/dir/file > exec tar czf www/archive.tar.gz archive # Force the collection of the Mac metadata for the home15/user test (0.001s) > [darwin] exec tar czf www/archive-mac-metadata.tar.gz --mac-metadata archive > httpd www # test that chezmoi diff includes external files by default (0.807s) > exec chezmoi diff [stdout] diff --git a/.file b/.file new file mode 100644 index 0000000000000000000000000000000000000000..8a52cb9ce9551221716a53786ad74104c5902362 --- /dev/null +++ b/.file @@ -0,0 +1 @@ +# contents of .file > stdout '^diff --git a/\.file b/\.file$' # test that chezmoi diff --exclude=externals excludes diffs from external files (0.774s) > exec chezmoi diff --exclude=externals > ! stdout '^diff --git a/\.file b/\.file$' # test that chezmoi reads external files from .chezmoiexternal.toml (0.586s) > exec chezmoi apply --force > cmp $HOME/.file golden/.file > [unix] cmpmod 666 $HOME/.file > chhome home2/user # test that chezmoi reads executable external files from .chezmoiexternal.toml (1.039s) > exec chezmoi apply --force > cmp $HOME/.file golden/.file > [unix] cmpmod 777 $HOME/.file > chhome home3/user # test that chezmoi managed --include=externals lists external targets (0.936s) > exec chezmoi managed --include=externals [stdout] .dir .dir/dir .dir/dir/file .dir/dir/symlink > cmp stdout golden/managed # test that chezmoi diff includes external archives by default (1.981s) > exec chezmoi diff [stdout] diff --git a/.dir/dir b/.dir/dir new file mode 40755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 --- /dev/null +++ b/.dir/dir diff --git a/.dir/dir/file b/.dir/dir/file new file mode 100644 index 0000000000000000000000000000000000000000..8a1745cd1f75b4d1f4bfcad207954b6e09676aac --- /dev/null +++ b/.dir/dir/file @@ -0,0 +1 @@ +# contents of dir/file diff --git a/.dir/dir/symlink b/.dir/dir/symlink new file mode 120000 index 0000000000000000000000000000000000000000..f73f3093ff865c514c6c51f867e35f693487d0d3 --- /dev/null +++ b/.dir/dir/symlink @@ -0,0 +1 @@ +file > stdout '^diff --git a/\.dir/dir/file b/\.dir/dir/file$' # test that chezmoi diff --exclude=externals excludes diffs from external archives (0.672s) > exec chezmoi diff --exclude=externals > ! stdout '^diff --git a/\.dir/dir/file b/\.dir/dir/file$' # test that chezmoi reads external archives from .chezmoiexternal.yaml (0.998s) > exec chezmoi apply --force > cmp $HOME/.dir/dir/file golden/dir/file > [unix] readlink $HOME/.dir/dir/symlink file > exists $HOME/.dir/file > chhome home4/user # test that chezmoi reads exact external archives from .chezmoiexternal.yaml (0.681s) > exec chezmoi apply --force > cmp $HOME/.dir/dir/file golden/dir/file > [unix] readlink $HOME/.dir/dir/symlink file > ! exists $HOME/.dir/file > chhome home5/user # test that chezmoi reads externals from subdirectories (0.411s) > exec chezmoi apply --force > cmp $HOME/.dir/subdir/dir/file golden/dir/file > [unix] readlink $HOME/.dir/subdir/dir/symlink file > chhome home6/user # test that .chezmoiignore applies to entries in externals (0.652s) > exec chezmoi apply --force > exists $HOME/.dir/dir/ > exists $HOME/.dir/dir/file > ! exists $HOME/.dir/dir/symlink > chhome home7/user # test that .chezmoiignore applies to entire externals (0.423s) > exec chezmoi apply --force > chhome home8/user # test that parent directories are created if needed (0.372s) > exec chezmoi apply --force > cmp $HOME/.dir1/file golden/dir/file > cmp $HOME/.dir2/dir2/file golden/dir/file > cmp $HOME/.dir3/dir3/dir3/file golden/dir/file > chhome home9/user # test that duplicate equivalent directories are allowed (0.349s) > exec chezmoi apply --force > chhome home10/user # test that checksums are verified (0.375s) > exec chezmoi apply --force > cp $HOME/.file golden/.file > chhome home11/user # test that checksums detect corrupt files (0.427s) > ! exec chezmoi apply --force [stderr] chezmoi: .file: MD5 mismatch: expected 49fe9018f97349cdd0a0ac7b7f668b05, got 449f9ee81bcb01a7b8b77cca6935b7d4 SHA256 mismatch: expected 634a4dd193c7b3b926d2e08026aa81a416fd41cec52854863b974af422495663, got dc436f17a1d14dc6941f41fd010d9b102cb26f05d765f0b68474f86471e912ad [exit status 1] > stderr 'MD5 mismatch' > stderr 'SHA256 mismatch' > chhome home12/user # test that chezmoi reads archive-file externals (0.345s) > exec chezmoi apply > cmp $HOME/.file golden/dir/file > chhome home13/user # test that chezmoi can set executable bits on archive-file externals (0.612s) > exec chezmoi apply > [umask:002] cmpmod 775 $HOME/.file > [umask:022] cmpmod 755 $HOME/.file > chhome home14/user # test that chezmoi reads external files from the .chezmoiexternal directory (0.275s) > exec chezmoi apply > cmp $HOME/.file golden/dir/file > [darwin] chhome home15/user # test that chezmoi managed --include=externals lists external targets including AppleDouble files (0.000s) > [darwin] exec chezmoi managed --include=externals > [darwin] cmp stdout golden/managed-appledouble PASS === NAME TestScript/initconfig testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'test requires path separator to be forward slash' > mkdir $CHEZMOISOURCEDIR # test that chezmoi init writes the initial config into the default config dir (0.743s) > cp golden/chezmoi1.yaml $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > exec chezmoi init > cmp $CHEZMOICONFIGDIR/chezmoi.yaml golden/chezmoi1.yaml # test that chezmoi init writes an updated config into the default config dir (0.701s) > cp golden/chezmoi2.yaml $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > exec chezmoi init > cmp $CHEZMOICONFIGDIR/chezmoi.yaml golden/chezmoi2.yaml # test that chezmoi init writes a config of a new format into the default config dir (2.555s) > rm $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > cp golden/chezmoi3.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi init > cmp $CHEZMOICONFIGDIR/chezmoi.yaml golden/chezmoi2.yaml > cmp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi3.toml # check that the last operation broke chezmoi (1.589s) > ! exec chezmoi status [stderr] chezmoi: multiple config files: $WORK/home/user/.config/chezmoi/chezmoi.toml and $WORK/home/user/.config/chezmoi/chezmoi.yaml [exit status 1] > ! stdout . > cmpenv stderr golden/error1.log # check that deleting the old config file fixes the issue (1.137s) > rm $CHEZMOICONFIGDIR/chezmoi.yaml > exec chezmoi status > ! stdout . > ! stderr . # check that the state file was written into the default config dir (0.002s) > exists $CHEZMOICONFIGDIR/chezmoistate.boltdb > chhome home2/user > mkdir $CHEZMOISOURCEDIR # test that chezmoi --config=path init writes the initial config into path (0.661s) > cp golden/chezmoi1.yaml $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > exec chezmoi --config=$HOME/.chezmoi/athome.yaml init > cmp $HOME/.chezmoi/athome.yaml golden/chezmoi1.yaml # test that chezmoi --config=path init writes an updated config into path (0.656s) > cp golden/chezmoi2.yaml $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > exec chezmoi --config=$HOME/.chezmoi/athome.yaml init > cmp $HOME/.chezmoi/athome.yaml golden/chezmoi2.yaml # test that chezmoi --config=path init writes a config of a new format into path (0.542s) > rm $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > cp golden/chezmoi3.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi --config=$HOME/.chezmoi/athome.yaml init > cmp $HOME/.chezmoi/athome.yaml golden/chezmoi3.toml # check that the last operation broke chezmoi (0.271s) > ! exec chezmoi --config=$HOME/.chezmoi/athome.yaml status [stderr] chezmoi: invalid config: $WORK/home2/user/.chezmoi/athome.yaml: yaml: unmarshal errors: line 1: cannot unmarshal !!seq into map[string]interface {} [exit status 1] > ! stdout . > cmpenv stderr golden/error2.log # check that renaming the file and updating the config path fixes the issue (0.278s) > mv $HOME/.chezmoi/athome.yaml $HOME/.chezmoi/athome.toml > exec chezmoi --config=$HOME/.chezmoi/athome.toml status > ! stdout . > ! stderr . # check that the state file was written next to the config file (0.000s) > exists $HOME/.chezmoi/chezmoistate.boltdb # check that nothing was ever written into the default config dir (0.001s) > ! exists $CHEZMOICONFIGDIR/chezmoi.toml > ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb > chhome home3/user > mkdir $CHEZMOISOURCEDIR # test that chezmoi --config=path --config-format=format init writes the initial config into path (0.360s) > cp golden/chezmoi1.yaml $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=yaml init > cmp $HOME/.chezmoi/athome.txt golden/chezmoi1.yaml # test that chezmoi --config=path --config-format=format init writes an updated config into path (0.369s) > cp golden/chezmoi2.yaml $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=yaml init > cmp $HOME/.chezmoi/athome.txt golden/chezmoi2.yaml # test that chezmoi --config=path --config-format=format init writes a config of a new format into path (0.349s) > rm $CHEZMOISOURCEDIR/.chezmoi.yaml.tmpl > cp golden/chezmoi3.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=yaml init > cmp $HOME/.chezmoi/athome.txt golden/chezmoi3.toml # check that the last operation broke chezmoi (0.503s) > ! exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=yaml status [stderr] chezmoi: invalid config: $WORK/home3/user/.chezmoi/athome.txt: yaml: unmarshal errors: line 1: cannot unmarshal !!seq into map[string]interface {} [exit status 1] > ! stdout . > cmpenv stderr golden/error3.log # check that updating the config format fixes the issue (0.302s) > exec chezmoi --config=$HOME/.chezmoi/athome.txt --config-format=toml status > ! stdout . > ! stderr . # check that the state file was written next to the config file (0.000s) > exists $HOME/.chezmoi/chezmoistate.boltdb # check that nothing was ever written into the default config dir (0.000s) > ! exists $CHEZMOICONFIGDIR/chezmoi.toml > ! exists $CHEZMOICONFIGDIR/chezmoistate.boltdb PASS === NAME TestScript/add testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mkhomedir > mksourcedir golden # test chezmoi add --create (2.213s) > exec chezmoi add --create $HOME${/}.create > cmp $CHEZMOISOURCEDIR/create_dot_create golden/create_dot_create # test that adding a directory creates a .keep file (0.642s) > exec chezmoi add --recursive=false $HOME${/}.dir > exists $CHEZMOISOURCEDIR/dot_dir/.keep # test adding a file in a directory (0.866s) > exec chezmoi add $HOME${/}.dir/file > cmp $CHEZMOISOURCEDIR/dot_dir/file golden/dot_dir/file # test adding a subdirectory (1.076s) > exec chezmoi add --exact $HOME${/}.dir/subdir > cmp $CHEZMOISOURCEDIR/dot_dir/exact_subdir/file golden/dot_dir/exact_subdir/file # test adding an empty file (1.038s) > exec chezmoi add $HOME${/}.empty > exists $CHEZMOISOURCEDIR/empty_dot_empty # test adding an executable file (3.517s) > exec chezmoi add $HOME${/}.executable > [unix] cmp $CHEZMOISOURCEDIR/executable_dot_executable golden/executable_dot_executable > [windows] cmp $CHEZMOISOURCEDIR/dot_executable golden/executable_dot_executable # test adding a private file (0.914s) > exec chezmoi add $HOME${/}.private > [unix] cmp $CHEZMOISOURCEDIR/private_dot_private $HOME/.private > [windows] cmp $CHEZMOISOURCEDIR/dot_private $HOME/.private # test adding a symlink (0.680s) > exec chezmoi add $HOME${/}.symlink > cmp $CHEZMOISOURCEDIR/symlink_dot_symlink golden/symlink_dot_symlink # test adding a symlink with a separator (0.818s) > symlink $HOME/.symlink2 -> .dir/subdir/file > exec chezmoi add $HOME${/}.symlink2 > cmp $CHEZMOISOURCEDIR/symlink_dot_symlink2 golden/symlink_dot_symlink # test adding a symlink with --follow (0.878s) > symlink $HOME${/}.symlink3 -> .file > exec chezmoi add --follow $HOME${/}.symlink3 > cmp $CHEZMOISOURCEDIR/dot_symlink3 golden/dot_file > chhome home2/user # test that chezmoi add only creates .keep files in empty directories (0.957s) > mkdir $HOME/.dir/empty_subdir > exec chezmoi add $HOME${/}.dir > ! exists $CHEZMOISOURCEDIR/dot_dir/.keep > exists $CHEZMOISOURCEDIR/dot_dir/empty_subdir/.keep > ! exists $CHEZMOISOURCEDIR/dot_dir/non_empty_subdir/.keep > chhome home3/user # test that chezmoi add respects .chezmoiignore (0.707s) > exec chezmoi add $HOME${/}.dir [stderr] chezmoi: warning: ignoring .dir/ignore > exists $CHEZMOISOURCEDIR/dot_dir/file > stderr 'warning: ignoring' > ! exists $CHEZMOISOURCEDIR/dot_dir/ignore > chhome home4/user # test that chezmoi add does not overwrite an already-added file (0.450s) > exec chezmoi add $HOME/.file > cmp $CHEZMOISOURCEDIR/dot_file golden/dot_file > edit $HOME/.file > cmp $CHEZMOISOURCEDIR/dot_file golden/dot_file # test that chezmoi add --force does overwrite an already-added file (0.774s) > exec chezmoi add --force $HOME/.file > cmp $CHEZMOISOURCEDIR/dot_file golden/edited_dot_file PASS === NAME TestScript/gpgencryption testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'skipping gpg tests on Windows' > [!exec:gpg] skip 'gpg not found in $PATH' > mkhomedir > mkgpgconfig # test that chezmoi add --encrypt encrypts (0.833s) > cp golden/.encrypted $HOME > exec chezmoi add --encrypt $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: checking the trustdb gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u gpg: next trustdb check due at 2027-02-11 > exists $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc > grep '-----BEGIN PGP MESSAGE-----' $CHEZMOISOURCEDIR/encrypted_dot_encrypted.asc # test that chezmoi apply decrypts (0.956s) > rm $HOME/.encrypted > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > cmp golden/.encrypted $HOME/.encrypted # test that chezmoi apply --exclude=encrypted does not apply encrypted files (2.345s) > rm $HOME/.encrypted > exec chezmoi apply --exclude=encrypted --force > ! exists $HOME/.encrypted > exec chezmoi apply --force [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > cmp $HOME/.encrypted golden/.encrypted # test that chezmoi detects gpg encryption if gpg is configured but encryption = "gpg" is not set (1.079s) > removeline $CHEZMOICONFIGDIR/chezmoi.toml 'encryption = "gpg"' > exec chezmoi cat $HOME${/}.encrypted [stdout] # contents of .encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > cmp stdout golden/.encrypted # test that chezmoi decrypt decrypts stdin (2.143s) > stdin $CHEZMOISOURCEDIR${/}encrypted_dot_encrypted.asc > exec chezmoi decrypt [stdout] # contents of .encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > cmp stdout golden/.encrypted # test that chezmoi decrypt decrypts a file (0.990s) > exec chezmoi decrypt $CHEZMOISOURCEDIR${/}encrypted_dot_encrypted.asc [stdout] # contents of .encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > cmp stdout golden/.encrypted # test chezmoi encrypt/chezmoi decrypt round trip (1.527s) > exec chezmoi encrypt golden/.encrypted [stdout] -----BEGIN PGP MESSAGE----- hF4DfSE2pILBi+QSAQdAbG5jSV1jayKWrsR1cWN3SdCvmsK6kAEaBTxeHygmbUsw VMQQeBT5VpBoxZSjy7LZqTHMIfJql2iTxdWCLlRcvnbKQEx3A9yEyYDspsDW5giy 1GYBCQIQpucn2UAD5K8D7/7/KCT8Y4sCiaH2U/Kd330sYi0XCGbz0BJLp8+Xd3tz ADREqADZeAyRUHEUAI5TmwmrkMVfN+f3C+I2hLrYN+tflKsqAu8G7sOq+CP+cXma 5v3JN2euAY0= =7Mu2 -----END PGP MESSAGE----- [stderr] gpg: Warning: using insecure memory! > stdout '-----BEGIN PGP MESSAGE-----' > stdin stdout > exec chezmoi decrypt [stdout] # contents of .encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > cmp stdout golden/.encrypted # test that chezmoi edit --apply transparently decrypts and re-encrypts (1.079s) > exec chezmoi edit --apply --force $HOME${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-encrypted3099391695/.encrypted: returned in less than 1s gpg: Warning: using insecure memory! gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > grep '# edited' $HOME/.encrypted # test that chezmoi files in subdirectories can be encrypted and that suffix can be set (1.450s) > appendline $CHEZMOICONFIGDIR/chezmoi.toml ' suffix = ".gpg"' > mkdir $HOME/.dir > cp golden/.encrypted $HOME/.dir > exec chezmoi add --encrypt $HOME${/}.dir${/}.encrypted [stderr] gpg: Warning: using insecure memory! > grep '-----BEGIN PGP MESSAGE-----' $CHEZMOISOURCEDIR/dot_dir/encrypted_dot_encrypted.gpg > exec chezmoi edit --apply $HOME${/}.dir${/}.encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" chezmoi: warning: $WORK/bin/editor $WORK/.tmp/chezmoi-encrypted3180680269/.dir/.encrypted: returned in less than 1s gpg: Warning: using insecure memory! gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" > grep '# edited' $HOME/.dir/.encrypted # test that chezmoi edit strips the encrypted suffix (0.656s) > [unix] env EDITOR=echo > [windows] env EDITOR=printargs > exec chezmoi edit $HOME${/}.dir${/}.encrypted [stdout] $WORK/.tmp/chezmoi-encrypted2375967945/.dir/.encrypted [stderr] gpg: Warning: using insecure memory! gpg: encrypted with cv25519 key, ID 7D2136A482C18BE4, created 2024-02-12 "chezmoi-test-gpg-key" chezmoi: warning: /usr/bin/echo $WORK/.tmp/chezmoi-encrypted2375967945/.dir/.encrypted: returned in less than 1s gpg: Warning: using insecure memory! > stdout '\.dir/\.encrypted\r?$' PASS === NAME TestScript/update testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > mkgitconfig > mkhomedir golden > mkhomedir > exec git init --bare $WORK/dotfiles.git [stdout] Initialized empty Git repository in $WORK/dotfiles.git/ > exec chezmoi init file://$WORK/dotfiles.git [stderr] Cloning into '$WORK/home/user/.local/share/chezmoi'... warning: You appear to have cloned an empty repository. # create a commit (4.162s) > exec chezmoi add $HOME${/}.file > exec chezmoi git add dot_file > exec chezmoi git commit -- --message 'Add dot_file' [stdout] [master (root-commit) 14a05fb] Add dot_file 1 file changed, 1 insertion(+) create mode 100644 dot_file > exec chezmoi git push [stderr] To file://$WORK/dotfiles.git * [new branch] master -> master > chhome home2/user # test that chezmoi init --apply inits and applies (1.810s) > mkgitconfig > exec chezmoi init --apply --force file://$WORK/dotfiles.git [stderr] Cloning into '$WORK/home2/user/.local/share/chezmoi'... > cmp $HOME/.file golden/.file > chhome home/user # create and push a new commit (2.393s) > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi git -- add dot_file > exec chezmoi git -- commit -m 'Update dot_file' [stdout] [master efaa726] Update dot_file 1 file changed, 1 insertion(+) > exec chezmoi git -- push [stderr] To file://$WORK/dotfiles.git 14a05fb..efaa726 master -> master > chhome home2/user # test chezmoi update (0.731s) > exec chezmoi update [stdout] Updating 14a05fb..efaa726 Fast-forward dot_file | 1 + 1 file changed, 1 insertion(+) [stderr] From file://$WORK/dotfiles 14a05fb..efaa726 master -> origin/master > grep -count=1 '# edited' $HOME/.file > chhome home/user # create and push a new commit (1.655s) > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi git -- add dot_file > exec chezmoi git -- commit -m 'Update dot_file' [stdout] [master e6b731d] Update dot_file 1 file changed, 1 insertion(+) > exec chezmoi git -- push [stderr] To file://$WORK/dotfiles.git efaa726..e6b731d master -> master > chhome home2/user # test chezmoi update --apply=false (0.899s) > exec chezmoi update --apply=false [stdout] Updating efaa726..e6b731d Fast-forward dot_file | 1 + 1 file changed, 1 insertion(+) [stderr] From file://$WORK/dotfiles efaa726..e6b731d master -> origin/master > grep -count=1 '# edited' $HOME/.file > exec chezmoi apply --force > grep -count=2 '# edited' $HOME/.file # test chezmoi update --init (0.749s) > cp golden/.chezmoi.toml.tmpl $CHEZMOISOURCEDIR > exec chezmoi update --init [stdout] Already up to date. > exec chezmoi execute-template '{{ .key }}' [stdout] value> stdout value PASS === NAME TestScript/managed testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test chezmoi managed (0.890s) > exec chezmoi managed [stdout] .create .dir .dir/file .dir/subdir .dir/subdir/file .empty .encrypted .executable .file .private .readonly .remove .symlink .template > cmp stdout golden/managed # test chezmoi managed --exclude-encrypted (1.067s) > exec chezmoi managed --exclude=encrypted [stdout] .create .dir .dir/file .dir/subdir .dir/subdir/file .empty .executable .file .private .readonly .remove .symlink .template > cmp stdout golden/managed-exclude-encrypted # test chezmoi managed --exclude=files (1.082s) > exec chezmoi managed --exclude=files [stdout] .dir .dir/subdir .symlink > cmp stdout golden/managed-exclude-files # test chezmoi managed --exclude=files,templates (1.169s) > exec chezmoi managed --exclude=files,templates [stdout] .dir .dir/subdir .symlink > cmp stdout golden/managed-exclude-files-and-templates # test chezmoi managed --include=all (0.973s) > exec chezmoi managed --include=all [stdout] .create .dir .dir/file .dir/subdir .dir/subdir/file .empty .encrypted .executable .file .private .readonly .remove .symlink .template > cmp stdout golden/managed-include-all # test chezmoi managed --include=dirs (2.442s) > exec chezmoi managed --include=dirs [stdout] .dir .dir/subdir > cmp stdout golden/managed-include-dirs # test chezmoi managed --include=encrypted (0.983s) > exec chezmoi managed --include=encrypted [stdout] .encrypted > cmp stdout golden/managed-include-encrypted # test chezmoi managed --include=files (0.559s) > exec chezmoi managed --include=files [stdout] .create .dir/file .dir/subdir/file .empty .encrypted .executable .file .private .readonly .remove .template > cmp stdout golden/managed-include-files # test chezmoi managed --include=files --exclude=templates (0.556s) > exec chezmoi managed --include=files --exclude=templates [stdout] .create .dir/file .dir/subdir/file .empty .encrypted .executable .file .private .readonly .remove > cmp stdout golden/managed-include-files-exclude-templates # test chezmoi managed --include=symlinks (0.456s) > exec chezmoi managed --include=symlinks [stdout] .symlink > cmp stdout golden/managed-include-symlinks # test chezmoi managed --include=templates (0.436s) > exec chezmoi managed --include=templates [stdout] .template > cmp stdout golden/managed-include-templates # test chezmoi managed with arguments (0.469s) > exec chezmoi managed $HOME${/}.dir $HOME${/}.create [stdout] .create .dir .dir/file .dir/subdir .dir/subdir/file > cmp stdout golden/managed-with-args # test chezmoi managed with child of managed dir as argument (0.641s) > exec chezmoi managed $HOME${/}.dir/subdir [stdout] .dir/subdir .dir/subdir/file > cmp stdout golden/managed-in-managed # test chezmoi managed --exclude=dir with arguments (0.330s) > exec chezmoi managed --exclude=dirs $HOME${/}.dir $HOME${/}.create [stdout] .create .dir/file .dir/subdir/file > cmp stdout golden/managed-with-nodir-args # test chezmoi managed with absent arguments (0.286s) > exec chezmoi managed $HOME${/}.dir $HOME${/}.non-exist [stdout] .dir .dir/file .dir/subdir .dir/subdir/file > cmp stdout golden/managed-with-absent-args # test chezmoi managed --path-style=absolute (0.249s) > [unix] exec chezmoi managed --path-style=absolute [stdout] $WORK/home/user/.create $WORK/home/user/.dir $WORK/home/user/.dir/file $WORK/home/user/.dir/subdir $WORK/home/user/.dir/subdir/file $WORK/home/user/.empty $WORK/home/user/.encrypted $WORK/home/user/.executable $WORK/home/user/.file $WORK/home/user/.private $WORK/home/user/.readonly $WORK/home/user/.remove $WORK/home/user/.symlink $WORK/home/user/.template > [unix] cmpenv stdout golden/managed-absolute # test chezmoi managed --path-style=source-absolute (0.490s) > exec chezmoi managed --path-style=source-absolute [stdout] $WORK/home/user/.local/share/chezmoi/create_dot_create $WORK/home/user/.local/share/chezmoi/dot_dir $WORK/home/user/.local/share/chezmoi/dot_dir/exact_subdir $WORK/home/user/.local/share/chezmoi/dot_dir/exact_subdir/file $WORK/home/user/.local/share/chezmoi/dot_dir/file $WORK/home/user/.local/share/chezmoi/dot_file $WORK/home/user/.local/share/chezmoi/dot_remove $WORK/home/user/.local/share/chezmoi/dot_template.tmpl $WORK/home/user/.local/share/chezmoi/empty_dot_empty $WORK/home/user/.local/share/chezmoi/encrypted_dot_encrypted $WORK/home/user/.local/share/chezmoi/executable_dot_executable $WORK/home/user/.local/share/chezmoi/private_dot_private $WORK/home/user/.local/share/chezmoi/readonly_dot_readonly $WORK/home/user/.local/share/chezmoi/symlink_dot_symlink > cmpenv stdout golden/managed-source-absolute # test chezmoi managed --path-style=source-relative (0.406s) > exec chezmoi managed --path-style=source-relative [stdout] create_dot_create dot_dir dot_dir/exact_subdir dot_dir/exact_subdir/file dot_dir/file dot_file dot_remove dot_template.tmpl empty_dot_empty encrypted_dot_encrypted executable_dot_executable private_dot_private readonly_dot_readonly symlink_dot_symlink > cmp stdout golden/managed-source-relative > chhome home2/user # test that chezmoi managed does not evaluate templates (0.407s) > exec chezmoi managed --include=all [stdout] .create .file .symlink .template script > cmp stdout golden/managed2 PASS === NAME TestScript/verify testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!umask:022] skip > mkhomedir golden > mkhomedir > mksourcedir # test that chezmoi verify succeeds (1.223s) > exec chezmoi verify # test that chezmoi verify fails when a file is added to the source state (5.397s) > cp golden/dot_newfile $CHEZMOISOURCEDIR/dot_newfile > ! exec chezmoi verify [exit status 1] > exec chezmoi forget --force $HOME${/}.newfile > exec chezmoi verify # test that chezmoi verify fails when a file is edited (2.034s) > edit $HOME/.file > ! exec chezmoi verify [exit status 1] > exec chezmoi apply --force $HOME${/}.file > exec chezmoi verify # test that chezmoi verify fails when a file is removed from the destination directory (2.032s) > rm $HOME/.file > ! exec chezmoi verify [exit status 1] > exec chezmoi apply --force $HOME${/}.file > exec chezmoi verify # test that chezmoi verify fails when a directory is removed from the destination directory (1.206s) > rm $HOME/.dir > ! exec chezmoi verify [exit status 1] > mkdir $HOME/.dir > exec chezmoi apply --force $HOME${/}.dir > exec chezmoi verify > [windows] stop 'remaining tests use file modes' # test that chezmoi verify fails when a file's permissions are changed (1.043s) > chmod 777 $HOME/.file > ! exec chezmoi verify [exit status 1] > exec chezmoi apply --force $HOME${/}.file > exec chezmoi verify # test that chezmoi verify fails when a directory's permissions are changed (1.060s) > chmod 700 $HOME/.dir > ! exec chezmoi verify [exit status 1] > exec chezmoi apply --force $HOME${/}.dir > exec chezmoi verify PASS === NAME TestScript/executetemplate testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test reading args (2.347s) > exec chezmoi execute-template '{{ "arg-template" }}' [stdout] arg-template> stdout arg-template # test reading from stdin (1.182s) > stdin golden/stdin.tmpl > exec chezmoi execute-template [stdout] stdin-template > stdout stdin-template # test reading from stdin with an argument (0.796s) > stdin golden/stdin > exec chezmoi execute-template --with-stdin '{{ .chezmoi.stdin | upper }}' [stdout] # CONTENTS OF STDIN > stdout '# CONTENTS OF STDIN' # test partial templates work (1.234s) > exec chezmoi execute-template '{{ template "partial" }}' [stdout] hello world > stdout 'hello world' # test that symlinks are supported in .chezmoitemplates (0.933s) > symlink $CHEZMOISOURCEDIR/.chezmoitemplates/symlink -> partial > exec chezmoi execute-template '{{ template "symlink" }}' [stdout] hello world > stdout 'hello world' # FIXME merge the following tests into a single test (2.362s) > exec chezmoi execute-template '{{ .last.config }}' [stdout] chezmoi.toml> stdout 'chezmoi\.toml' # test that template data are read from .chezmoidata.json (2.526s) > exec chezmoi execute-template '{{ .last.json }}' [stdout] .chezmoidata.json> stdout '\.chezmoidata\.json' # test that template data are read from .chezmoidata.toml (0.496s) > exec chezmoi execute-template '{{ .last.toml }}' [stdout] .chezmoidata.toml> stdout '\.chezmoidata\.toml' # test that template data are read from .chezmoidata.yaml (0.465s) > exec chezmoi execute-template '{{ .last.yaml }}' [stdout] .chezmoidata.yaml> stdout '\.chezmoidata\.yaml' # test that the last .chezmoidata. file read wins (0.517s) > exec chezmoi execute-template '{{ .last.format }}' [stdout] .chezmoidata.yaml> stdout '\.chezmoidata\.yaml' # test that the config file wins over .chezmoidata. (0.538s) > exec chezmoi execute-template '{{ .last.global }}' [stdout] chezmoi.toml> stdout chezmoi.toml # test that chezmoi execute-template --init does not include .chezmoidata. data (0.403s) > ! exec chezmoi execute-template --init '{{ .last.format }}' [stderr] chezmoi: template: arg1:1:8: executing "arg1" at <.last.format>: map has no entry for key "format" [exit status 1] > stderr 'map has no entry for key "format"' # test --init --promptBool (0.729s) > exec chezmoi execute-template --init --promptBool value=yes '{{ promptBool "value" }}' [stdout] true> stdout true > ! exec chezmoi execute-template --promptBool value=error [stderr] chezmoi: strconv.ParseBool: parsing "error": invalid syntax [exit status 1] > stderr 'invalid syntax' # test --init --promptBool with a default value (0.361s) > exec chezmoi execute-template --init '{{ promptBool "value" true }}' [stdout] true> stdout true # test --init --promptChoice (0.340s) > exec chezmoi execute-template --init --promptChoice value=one '{{ promptChoice "value" (list "one" "two" "three") }}' [stdout] one> stdout one # test --init --promptChoice with an invalid value (0.281s) > ! exec chezmoi execute-template --init --promptChoice value=four '{{ promptChoice "value" (list "one" "two" "three") }}' [stderr] chezmoi: template: arg1:1:3: executing "arg1" at : error calling promptChoice: four: invalid choice [exit status 1] > stderr 'invalid choice' # test --init --promptChoice with a default value (0.314s) > exec chezmoi execute-template --init '{{ promptChoice "value" (list "one" "two" "three") "three" }}' [stdout] three> stdout three # test --init --promptInt (0.556s) > exec chezmoi execute-template --init --promptInt value=1 '{{ promptInt "value" }}' [stdout] 1> stdout 1 > ! exec chezmoi execute-template --promptInt value=error [stderr] chezmoi: invalid argument "value=error" for "--promptInt" flag: strconv.Atoi: parsing "error": invalid syntax [exit status 1] > stderr 'invalid syntax' # test --init --promptInt with a default value (0.371s) > exec chezmoi execute-template --init '{{ promptInt "value" 1 }}' [stdout] 1> stdout 1 # test --init --promptString (0.300s) > exec chezmoi execute-template --init --promptString email=user@example.com '{{ promptString "email" }}' [stdout] user@example.com> stdout 'user@example.com' # test --init --promptString without a default value (0.283s) > exec chezmoi execute-template --init '{{ promptString "value" }}' [stdout] value> stdout value # test --init --promptString with a default value (0.256s) > exec chezmoi execute-template --init '{{ promptString "value" "default" }}' [stdout] default> stdout default # test that chezmoi execute-template reads all files in the .chezmoidata subdirectory (0.303s) > exec chezmoi execute-template '{{ .a }}{{ .b }}' [stdout] alphabeta> stdout 'alphabeta' > chhome home2/user # test that files in .chezmoidata must have known extensions (0.306s) > ! exec chezmoi execute-template [stderr] chezmoi: $WORK/home2/user/.local/share/chezmoi/.chezmoidata/unknown: : unknown format [exit status 1] > stderr 'unknown format' > chhome home3/user # test that .chezmoiignore files are not allowed in .chezmoidata (0.325s) > ! exec chezmoi execute-template [stderr] chezmoi: $WORK/home3/user/.local/share/chezmoi/.chezmoidata/.chezmoiignore: not allowed in .chezmoidata directory [exit status 1] > stderr 'not allowed in .chezmoidata directory' PASS === NAME TestScript/init testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [!exec:git] skip 'git not found in $PATH' > mkgitconfig > mkhomedir golden > mkhomedir # test that chezmoi init creates a git repo (0.744s) > exec chezmoi init > exists $CHEZMOISOURCEDIR/.git # create a commit (1.461s) > cp golden/chezmoi.toml $CHEZMOISOURCEDIR/.chezmoi.toml.tmpl > cp golden/.file $CHEZMOISOURCEDIR/dot_file > exec chezmoi git add . > exec chezmoi git commit -- --message 'Initial commit' [stdout] [master (root-commit) 1f17a89] Initial commit 2 files changed, 3 insertions(+) create mode 100644 .chezmoi.toml.tmpl create mode 100644 dot_file > chhome home2/user # test that chezmoi init fetches git repo but does not apply (1.627s) > mkgitconfig > exec chezmoi init file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home2/user/.local/share/chezmoi'... > exists $CHEZMOISOURCEDIR/.git > ! exists $HOME/.file > chhome home3/user # test that chezmoi init --apply fetches a git repo and runs chezmoi apply (1.669s) > mkgitconfig > exec chezmoi init --apply --force file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home3/user/.local/share/chezmoi'... > exists $CHEZMOISOURCEDIR/.git > cmp $HOME/.file golden/.file > chhome home4/user # test that chezmoi init --apply --depth 1 --force --purge clones, applies, and purges (1.754s) > mkgitconfig > exists $CHEZMOICONFIGDIR > ! exists $CHEZMOISOURCEDIR > exec chezmoi init --apply --depth 1 --force --purge file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home4/user/.local/share/chezmoi'... > cmp $HOME/.file golden/.file > ! exists $CHEZMOICONFIGDIR > ! exists $CHEZMOISOURCEDIR > chhome home5/user # test that chezmoi init does not clone the repo if it is already checked out but does create the config file (0.520s) > mkgitconfig > exec chezmoi init --source=$HOME/dotfiles file://$WORK/nonexistentrepo > exists $CHEZMOICONFIGDIR/chezmoi.toml > chhome home6/user # test chezmoi init --one-shot (0.775s) > mkgitconfig > exec chezmoi init --one-shot file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home6/user/.local/share/chezmoi'... > cmp $HOME/.file golden/.file > ! exists $CHEZMOICONFIGDIR > ! exists $CHEZMOISOURCEDIR > chhome home7/user # test chezmoi init --data=true (0.517s) > mkgitconfig > exec chezmoi init --data=true file://$WORK/home/user/.local/share/chezmoi > cmp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi.toml # test chezmoi init --data=false (0.445s) > exec chezmoi init --data=false file://$WORK/home/user/.local/share/chezmoi > cmp $CHEZMOICONFIGDIR/chezmoi.toml golden/chezmoi.toml-no-data > chhome home8/user # test that chezmoi init fails if the generated config is not valid (0.648s) > mkgitconfig > ! exec chezmoi init [stderr] chezmoi: $WORK/home8/user/.local/share/chezmoi/.chezmoi.toml.tmpl: toml: expected character = [exit status 1] > stderr '\.chezmoi\.toml\.tmpl: toml: expected character =' > ! exists .config/chezmoi > chhome home/user # create a new branch (1.192s) > exec chezmoi git checkout -- -b new-branch [stderr] Switched to a new branch 'new-branch' > edit $CHEZMOISOURCEDIR/dot_file > exec chezmoi git add dot_file > exec chezmoi git commit -- --message 'Edit .file' [stdout] [new-branch e64c301] Edit .file 1 file changed, 1 insertion(+) > exec chezmoi git checkout master [stderr] Switched to branch 'master' > chhome home9/user # test chezmoi init --branch (0.529s) > mkgitconfig > exec chezmoi init --apply --branch=new-branch file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home9/user/.local/share/chezmoi'... > grep '# edited' $HOME/.file > chhome home10/user # test chezmoi --config init (0.695s) > mkgitconfig > exec chezmoi --config=$HOME/.chezmoi.toml init file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home10/user/.local/share/chezmoi'... > cmp $HOME/.chezmoi.toml golden/chezmoi.toml > ! exists $CHEZMOICONFIGDIR/chezmoi.toml > chhome home11/user # test chezmoi init --config-path (0.765s) > mkgitconfig > exec chezmoi init --config-path=$HOME/.chezmoi.toml file://$WORK/home/user/.local/share/chezmoi [stderr] Cloning into '$WORK/home11/user/.local/share/chezmoi'... > cmp $HOME/.chezmoi.toml golden/chezmoi.toml > ! exists $CHEZMOICONFIGDIR/chezmoi.toml > chhome home12/user # test chezmoi init when the source dir is already in a git working copy (0.396s) > mkgitconfig > exec git init $HOME/.local/share [stdout] Initialized empty Git repository in $WORK/home12/user/.local/share/.git/ > exec chezmoi init > ! exists $CHEZMOISOURCEDIR/.git > chhome home13/user # test chezmoi init --prompt* (0.528s) > exec chezmoi init --promptBool bool=true,boolOncePrompt=true --promptChoice=choice=one,choiceOncePrompt=two --promptInt int=1,intOncePrompt=2 --promptString bool=string,stringOncePrompt=once > cmp $CHEZMOICONFIGDIR/chezmoi.yaml golden/chezmoi.yaml > chhome home14/user # test that chezmoi init creates a config file with a .yml extension (0.414s) > exec chezmoi init > exists $CHEZMOICONFIGDIR/chezmoi.yml # test that chezmoi reads a config file with a .yml extension (0.410s) > exec chezmoi execute-template '{{ .key }}' [stdout] value> stdout ^value$ PASS === NAME TestScript/chattr testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > mksourcedir # test that chezmoi chattr empty sets the empty attribute on a file (0.894s) > exists $CHEZMOISOURCEDIR/dot_file > exec chezmoi chattr empty $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/dot_file > exists $CHEZMOISOURCEDIR/empty_dot_file # test that chezmoi chattr remove sets the remove attribute on a file (1.191s) > exec chezmoi chattr remove $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/empty_dot_file > exists $CHEZMOISOURCEDIR/remove_dot_file # test that chezmoi chattr noremove removes the remove attribute on a file (0.933s) > exec chezmoi chattr noremove,empty $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/remove_dot_file > exists $CHEZMOISOURCEDIR/empty_dot_file # test that chezmoi attr +p sets the private attribute on a file (0.826s) > exec chezmoi chattr +p $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/empty_dot_file > exists $CHEZMOISOURCEDIR/private_empty_dot_file # test that chezmoi chattr t,-e sets the template attribute and removes the empty attribute on a file (0.933s) > exec chezmoi chattr t,-e $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/private_empty_dot_file > exists $CHEZMOISOURCEDIR/private_dot_file.tmpl # test that chezmoi chattr -- -e,-p,r sets the readonly attribute on a file and removes the empty and private attributes (2.891s) > exec chezmoi chattr -- -e,-p,r $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/private_dot_file.tmpl > exists $CHEZMOISOURCEDIR/readonly_dot_file.tmpl # test that chezmoi chattr -- -r,-t removes the readonly and template attributes on a file (0.681s) > exec chezmoi chattr -- -r,-t $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/readonly_dot_file.tmpl > exists $CHEZMOISOURCEDIR/dot_file # test that chezmoi chattr +create changes a file to be a create_ file (0.618s) > exec chezmoi chattr +create $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/dot_file > exists $CHEZMOISOURCEDIR/create_dot_file # test that chezmoi chattr nomodify does not change a create_ file (0.336s) > exec chezmoi chattr nomodify $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/dot_file > exists $CHEZMOISOURCEDIR/create_dot_file # test that chezmoi chattr modify,script,symlink changes a create_ file to a symlink_ (0.503s) > exec chezmoi chattr modify,script,symlink $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/create_dot_file > exists $CHEZMOISOURCEDIR/symlink_dot_file # test that chezmoi chattr -- -symlink changes a symlink_ to a regular file (0.437s) > exec chezmoi chattr -- -symlink $HOME${/}.file > ! exists $CHEZMOISOURCEDIR/symlink_dot_file > exists $CHEZMOISOURCEDIR/dot_file # test that chezmoi chattr nox removes the execute attribute on a file (0.471s) > exists $CHEZMOISOURCEDIR/executable_dot_executable > exec chezmoi chattr nox $HOME${/}.executable > ! exists $CHEZMOISOURCEDIR/executable_dot_executable > exists $CHEZMOISOURCEDIR/dot_executable # test that chezmoi chattr x sets the executable attribute on a file (0.368s) > exec chezmoi chattr x $HOME${/}.executable > ! exists $CHEZMOISOURCEDIR/dot_executable > exists $CHEZMOISOURCEDIR/executable_dot_executable # test that chezmoi chattr +private sets the private attribute on a create file (0.278s) > exec chezmoi chattr +private $HOME${/}.create > ! exists $CHEZMOISOURCEDIR/create_dot_create > exists $CHEZMOISOURCEDIR/create_private_dot_create # test that chezmoi chattr noprivate removes the private attribute on a create file (0.359s) > exec chezmoi chattr noprivate $HOME${/}.create > ! exists $CHEZMOISOURCEDIR/create_private_dot_create > exists $CHEZMOISOURCEDIR/create_dot_create # test that chezmoi chattr exact sets the exact attribute on a directory (0.441s) > exists $CHEZMOISOURCEDIR/dot_dir > exec chezmoi chattr exact $HOME${/}.dir > ! exists $CHEZMOISOURCEDIR/dot_dir > exists $CHEZMOISOURCEDIR/exact_dot_dir # test that chezmoi chattr readonly sets the readonly attribute on a directory (0.378s) > exec chezmoi chattr readonly $HOME${/}.dir > ! exists $CHEZMOISOURCEDIR/exact_dot_dir > exists $CHEZMOISOURCEDIR/exact_readonly_dot_dir # test that chezmoi chattr remove sets the remove attribute on a directory (0.373s) > exec chezmoi chattr remove $HOME${/}.dir > ! exists $CHEZMOISOURCEDIR/exact_readonly_dot_dir > exists $CHEZMOISOURCEDIR/remove_exact_readonly_dot_dir # test that chezmoi chattr noremove removes the remove attribute on a directory (0.373s) > exec chezmoi chattr noremove $HOME${/}.dir > ! exists $CHEZMOISOURCEDIR/remove_exact_readonly_dot_dir > exists $CHEZMOISOURCEDIR/exact_readonly_dot_dir # test that chezmoi chattr +t sets the template attribute on a symlink (0.326s) > exists $CHEZMOISOURCEDIR/symlink_dot_symlink > exec chezmoi chattr +t $HOME${/}.symlink > ! exists $CHEZMOISOURCEDIR/symlink_dot_symlink > exists $CHEZMOISOURCEDIR/symlink_dot_symlink.tmpl # test that chezmoi chattr -- -t removes the template attribute on a symlink (0.318s) > exec chezmoi chattr -- -t $HOME${/}.symlink > ! exists $CHEZMOISOURCEDIR/symlink_dot_symlink.tmpl > exists $CHEZMOISOURCEDIR/symlink_dot_symlink # test that chezmoi chattr -- before sets the before attribute on a script (0.325s) > exec chezmoi chattr -- before $HOME/script.sh > ! exists $CHEZMOISOURCEDIR/run_script.sh > exists $CHEZMOISOURCEDIR/run_before_script.sh # test that chezmoi chattr -- once sets the once attribute on a script (0.356s) > exec chezmoi chattr -- once $HOME/script.sh > ! exists $CHEZMOISOURCEDIR/run_before_script.sh > exists $CHEZMOISOURCEDIR/run_once_before_script.sh # test that chezmoi chattr -- after sets the after attribute on a script and removes the before attribute (0.370s) > exec chezmoi chattr -- after $HOME/script.sh > ! exists $CHEZMOISOURCEDIR/run_once_before_script.sh > exists $CHEZMOISOURCEDIR/run_once_after_script.sh # test that chezmoi chattr onchange sets the onchange attribute on a script and removes the only attribute (0.313s) > exec chezmoi chattr -- onchange $HOME/script.sh > ! exists $CHEZMOISOURCEDIR/run_once_after_script.sh > exists $CHEZMOISOURCEDIR/run_onchange_after_script.sh # test that chezmoi chattr -- -onchange removes the onchange attribute on a script (0.349s) > exec chezmoi chattr -- -onchange $HOME/script.sh > ! exists $CHEZMOISOURCEDIR/run_onchange_after_script.sh > exists $CHEZMOISOURCEDIR/run_after_script.sh # test that chezmoi chattr -- -a removes the after attribute on a script (0.309s) > exec chezmoi chattr -- -a $HOME/script.sh > ! exists $CHEZMOISOURCEDIR/run_after_script.sh > exists $CHEZMOISOURCEDIR/run_script.sh # test that chezmoi chattr +executable,+private,+readonly,+template sets the attributes on a modify script (0.393s) > exec chezmoi chattr +executable,+private,+readonly,+template $HOME${/}.modify > ! exists $CHEZMOISOURCEDIR/modify_dot_modify > exists $CHEZMOISOURCEDIR/modify_private_readonly_executable_dot_modify.tmpl # test that chezmoi chattr --dry-run --verbose generates a diff when a file is renamed (0.316s) > exec chezmoi chattr --dry-run --verbose +executable $HOME${/}.file [stdout] diff --git a/dot_file b/executable_dot_file rename from dot_file rename to executable_dot_file > cmp stdout golden/chattr-diff # test that chezmoi chattr --recursive noexact recurses into subdirectories (0.328s) > exists $CHEZMOISOURCEDIR/exact_readonly_dot_dir > exists $CHEZMOISOURCEDIR/exact_readonly_dot_dir/exact_subdir > exec chezmoi chattr --recursive noexact $HOME${/}.dir > exists $CHEZMOISOURCEDIR/readonly_dot_dir > exists $CHEZMOISOURCEDIR/readonly_dot_dir/subdir PASS === NAME TestScript/templatefuncs testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [unix] chmod 755 bin/chezmoi-output-test > [unix] chmod 755 bin/generate-color-formats > [unix] chmod 755 bin/ioreg > [unix] chmod 755 bin/executable > [windows] unix2dos bin/chezmoi-output-test.cmd > symlink $HOME/symlink -> dir # test comment template function (0.870s) > exec chezmoi execute-template '{{ "line1\nline2" | comment "# " }}' [stdout] # line1 # line2> rmfinalnewline golden/comment > cmp stdout golden/comment # test completion template function (0.925s) > exec chezmoi execute-template '{{ completion "zsh" }}' [stdout] #compdef chezmoi compdef _chezmoi chezmoi # zsh completion for chezmoi -*- shell-script -*- __chezmoi_debug() { local file="$BASH_COMP_DEBUG_FILE" if [[ -n ${file} ]]; then echo "$*" >> "${file}" fi } _chezmoi() { local shellCompDirectiveError=1 local shellCompDirectiveNoSpace=2 local shellCompDirectiveNoFileComp=4 local shellCompDirectiveFilterFileExt=8 local shellCompDirectiveFilterDirs=16 local shellCompDirectiveKeepOrder=32 local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder local -a completions __chezmoi_debug "\n========= starting completion logic ==========" __chezmoi_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" # The user could have moved the cursor backwards on the command-line. # We need to trigger completion from the $CURRENT location, so we need # to truncate the command-line ($words) up to the $CURRENT location. # (We cannot use $CURSOR as its value does not work when a command is an alias.) words=("${=words[1,CURRENT]}") __chezmoi_debug "Truncated words[*]: ${words[*]}," lastParam=${words[-1]} lastChar=${lastParam[-1]} __chezmoi_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" # For zsh, when completing a flag with an = (e.g., chezmoi -n=) # completions must be prefixed with the flag setopt local_options BASH_REMATCH if [[ "${lastParam}" =~ '-.*=' ]]; then # We are dealing with a flag with an = flagPrefix="-P ${BASH_REMATCH}" fi # Prepare the command to obtain completions requestComp="${words[1]} __complete ${words[2,-1]}" if [ "${lastChar}" = "" ]; then # If the last parameter is complete (there is a space following it) # We add an extra empty parameter so we can indicate this to the go completion code. __chezmoi_debug "Adding extra empty parameter" requestComp="${requestComp} \"\"" fi __chezmoi_debug "About to call: eval ${requestComp}" # Use eval to handle any environment variables and such out=$(eval ${requestComp} 2>/dev/null) __chezmoi_debug "completion output: ${out}" # Extract the directive integer following a : from the last line local lastLine while IFS='\n' read -r line; do lastLine=${line} done < <(printf "%s\n" "${out[@]}") __chezmoi_debug "last line: ${lastLine}" if [ "${lastLine[1]}" = : ]; then directive=${lastLine[2,-1]} # Remove the directive including the : and the newline local suffix (( suffix=${#lastLine}+2)) out=${out[1,-$suffix]} else # There is no directive specified. Leave $out as is. __chezmoi_debug "No directive found. Setting do default" directive=0 fi __chezmoi_debug "directive: ${directive}" __chezmoi_debug "completions: ${out}" __chezmoi_debug "flagPrefix: ${flagPrefix}" if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then __chezmoi_debug "Completion received error. Ignoring completions." return fi local activeHelpMarker="_activeHelp_ " local endIndex=${#activeHelpMarker} local startIndex=$((${#activeHelpMarker}+1)) local hasActiveHelp=0 while IFS='\n' read -r comp; do # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then __chezmoi_debug "ActiveHelp found: $comp" comp="${comp[$startIndex,-1]}" if [ -n "$comp" ]; then compadd -x "${comp}" __chezmoi_debug "ActiveHelp will need delimiter" hasActiveHelp=1 fi continue fi if [ -n "$comp" ]; then # If requested, completions are returned with a description. # The description is preceded by a TAB character. # For zsh's _describe, we need to use a : instead of a TAB. # We first need to escape any : as part of the completion itself. comp=${comp//:/\\:} local tab="$(printf '\t')" comp=${comp//$tab/:} __chezmoi_debug "Adding completion: ${comp}" completions+=${comp} lastComp=$comp fi done < <(printf "%s\n" "${out[@]}") # Add a delimiter after the activeHelp statements, but only if: # - there are completions following the activeHelp statements, or # - file completion will be performed (so there will be choices after the activeHelp) if [ $hasActiveHelp -eq 1 ]; then if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then __chezmoi_debug "Adding activeHelp delimiter" compadd -x "--" hasActiveHelp=0 fi fi if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then __chezmoi_debug "Activating nospace." noSpace="-S ''" fi if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then __chezmoi_debug "Activating keep order." keepOrder="-V" fi if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then # File extension filtering local filteringCmd filteringCmd='_files' for filter in ${completions[@]}; do if [ ${filter[1]} != '*' ]; then # zsh requires a glob pattern to do file filtering filter="\*.$filter" fi filteringCmd+=" -g $filter" done filteringCmd+=" ${flagPrefix}" __chezmoi_debug "File filtering command: $filteringCmd" _arguments '*:filename:'"$filteringCmd" elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then # File completion for directories only local subdir subdir="${completions[1]}" if [ -n "$subdir" ]; then __chezmoi_debug "Listing directories in $subdir" pushd "${subdir}" >/dev/null 2>&1 else __chezmoi_debug "Listing directories in ." fi local result _arguments '*:dirname:_files -/'" ${flagPrefix}" result=$? if [ -n "$subdir" ]; then popd >/dev/null 2>&1 fi return $result else __chezmoi_debug "Calling _describe" if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then __chezmoi_debug "_describe found some completions" # Return the success of having called _describe return 0 else __chezmoi_debug "_describe did not find completions." __chezmoi_debug "Checking if we should do file completion." if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then __chezmoi_debug "deactivating file completion" # We must return an error code here to let zsh know that there were no # completions found by _describe; this is what will trigger other # matching algorithms to attempt to find completions. # For example zsh can match letters in the middle of words. return 1 else # Perform file completion __chezmoi_debug "Activating file completion" # We must return the result of this command, so it must be the # last command, or else we must store its result to return it. _arguments '*:filename:_files'" ${flagPrefix}" fi fi fi } # don't run the completion function when being source-ed or eval-ed if [ "$funcstack[1]" = "_chezmoi" ]; then _chezmoi fi > stdout '^# zsh completion for chezmoi' # test deleteValueAtPath template function (0.664s) > exec chezmoi execute-template '{{ dict "a" (dict "b" (dict "c" 1 "d" 2)) | deleteValueAtPath "a.b.c" | toJson }}' [stdout] {"a":{"b":{"d":2}}}> rmfinalnewline golden/deleteValueAtPath > cmp stdout golden/deleteValueAtPath # test eqFold template function (0.789s) > exec chezmoi execute-template '{{ eqFold "foo" "Foo" "FOO" }}' [stdout] true> stdout '^true$' # test that the fromJson template function can deserialize JSON values (1.264s) > exec chezmoi execute-template '{{ fromJson "1" }}' [stdout] 1> stdout '^1$' # test that the fromJson template function can deserialize JSON arrays (0.921s) > exec chezmoi execute-template '{{ fromJson "[1, 2]" }}' [stdout] [1 2]> stdout '^\[1 2\]$' # test fromJsonc template function (2.340s) > stdin golden/example.jsonc > exec chezmoi execute-template --with-stdin '{{ fromJsonc .chezmoi.stdin | toJson }}' [stdout] {"key":1}> stdout '{"key":1}' # test glob template function (0.757s) > exec chezmoi execute-template '{{ glob "*.txt" | join "\n" }}{{ "\n" }}' [stdout] file1.txt file2.txt > cmp stdout golden/glob # test hexDecode template function (1.171s) > exec chezmoi execute-template '{{ "6578616d706c65" | hexDecode }}' [stdout] example> stdout '^example$' # test hexEncode template function (0.743s) > exec chezmoi execute-template '{{ "example" | hexEncode }}' [stdout] 6578616d706c65> stdout '^6578616d706c65$' # test ioreg template function (0.000s) > [darwin] exec chezmoi execute-template '{{ index ioreg "IOKitBuildVersion" }}' > [darwin] stdout 'Darwin Kernel Version' # test include template function with absolute path (0.664s) > exec chezmoi execute-template '{{ joinPath (env "HOME") ".include" | include }}' [stdout] # contents of .include > cmp stdout golden/include-abspath # test include template function with relative paths (0.597s) > exec chezmoi execute-template '{{ include ".include" }}' [stdout] # contents of .local/share/chezmoi/.include > cmp stdout golden/include-relpath # test includeTemplate template function (0.596s) > exec chezmoi execute-template '{{ includeTemplate ".template" "data" }}' [stdout] data > stdout ^data$ # test includeTemplate template function searches .chezmoitemplates (0.617s) > exec chezmoi execute-template '{{ includeTemplate "template" "data" }}' [stdout] data > stdout ^data$ # test joinPath template function (0.421s) > exec chezmoi execute-template '{{ joinPath "a" "b" }}' [stdout] a/b> stdout a${/}b # test jq template function (0.421s) > exec chezmoi execute-template '{{ dict "key" "value" | jq ".key" | first }}' [stdout] value> stdout ^value$ # test isExecutable template function positive test case (0.349s) > [unix] exec chezmoi execute-template '{{ isExecutable "bin/executable" }}' [stdout] true> [windows] exec chezmoi execute-template '{{ isExecutable "bin/executable.cmd" }}' > stdout ^true$ # test isExecutable template function negative test case (0.322s) > exec chezmoi execute-template '{{ isExecutable "bin/not-executable" }}' [stdout] false> stdout ^false$ # test findExecutable template function to find in specified script varargs - success (0.444s) > [!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib" "/bin" "/usr/bin") }}' [stdout] /bin/echo> [!windows] stdout ^/bin/echo$ # test findOneExecutable template function to find in specified script varargs - success (0.404s) > [!windows] exec chezmoi execute-template '{{ findOneExecutable (list "chezmoish" "echo") (list "/lib" "/bin" "/usr/bin") }}' [stdout] /bin/echo> [!windows] stdout ^/bin/echo$ # test findExecutable template function to find in specified script varargs - failure (0.419s) > [!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib") }}' > [!windows] stdout ^$ # test findExecutable template function to find in specified script - success (0.329s) > [!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib" "/bin" "/usr/bin") }}' [stdout] /bin/echo> [!windows] stdout ^/bin/echo$ # test findExecutable template function to find in specified script - failure (0.378s) > [!windows] exec chezmoi execute-template '{{ findExecutable "echo" (list "/lib") }}' > [!windows] stdout ^$ # test findExecutable template function to find in specified script - success with extension (0.000s) > [windows] exec chezmoi execute-template '{{ findExecutable "git.exe" (list "c:\\windows\\system32" "c:\\windows\\system64" "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" "C:\\Program Files\\Git\\cmd") }}' > [windows] stdout 'git' # test findExecutable template function to find in specified script - success without extension (0.000s) > [windows] exec chezmoi execute-template '{{ findExecutable "git" (list "c:\\windows\\system32" "c:\\windows\\system64" "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" "C:\\Program Files\\Git\\cmd") }}' > [windows] stdout 'git' # test findExecutable template function to find in specified script - failure (0.000s) > [windows] exec chezmoi execute-template '{{ findExecutable "asdf" (list "c:\\windows\\system32" "c:\\windows\\system64" "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0" "C:\\Program Files\\Git\\cmd") }}' > [windows] stdout '^$' # test lookPath template function to find in PATH (0.410s) > exec chezmoi execute-template '{{ lookPath "go" }}' [stdout] /usr/lib/go/bin/go> stdout go$exe # test lookPath template function to check if file exists (0.433s) > exec chezmoi execute-template '{{ lookPath "/non-existing-file" }}' > ! stdout . # test lstat template function (0.348s) > exec chezmoi execute-template '{{ (joinPath .chezmoi.homeDir "symlink" | lstat).type }}' [stdout] symlink> stdout ^symlink$ # test mozillaInstallHash template function (0.419s) > exec chezmoi execute-template '{{ mozillaInstallHash "/Applications/Firefox.app/Contents/MacOS" }}' [stdout] 2656FF1E876E9973> stdout 2656FF1E876E9973 # test the output and fromJson template functions (0.372s) > [unix] exec chezmoi execute-template '{{ $red := output "generate-color-formats" "#ff0000" | fromJson }}{{ $red.rgb.r }}' [stdout] 255> [unix] stdout '^255$' # test that the output function returns an error if the command fails (0.353s) > [unix] ! exec chezmoi execute-template '{{ output "false" }}' [stderr] chezmoi: template: arg1:1:3: executing "arg1" at : error calling output: /usr/bin/false: exit status 1 [exit status 1] > [unix] stderr 'error calling output: .*/false: exit status 1' # test pruneEmptyDicts template function (0.341s) > exec chezmoi execute-template '{{ dict "key1" "value1" "key2" (dict) | pruneEmptyDicts | toJson }}' [stdout] {"key1":"value1"}> rmfinalnewline golden/pruneEmptyDicts > cmp stdout golden/pruneEmptyDicts # test replaceAllRegex template function (0.301s) > exec chezmoi execute-template '{{ "foo bar baz" | replaceAllRegex "ba" "BA" }}' [stdout] foo BAr BAz> stdout 'foo BAr BAz' # test setValueAtPath template function (0.298s) > exec chezmoi execute-template '{{ dict | setValueAtPath "key1.key2" "value2" | toJson }}' [stdout] {"key1":{"key2":"value2"}}> rmfinalnewline golden/setValueAtPath > cmp stdout golden/setValueAtPath # test toIni template function (0.299s) > exec chezmoi execute-template '{{ dict "key" "value" "section" (dict "subkey" "subvalue") | toIni }}' [stdout] key = value [section] subkey = subvalue > cmp stdout golden/toIni # test stat template function (0.308s) > exec chezmoi execute-template '{{ (joinPath .chezmoi.homeDir "symlink" | stat).isDir }}' [stdout] true> stdout true # test that the output template function returns a command's output (0.355s) > exec chezmoi execute-template '{{ output "chezmoi-output-test" "arg" | trim }}' [stdout] arg> stdout arg # test that the output template function fails if the command fails (0.396s) > ! exec chezmoi execute-template '{{ output "false" }}' [stderr] chezmoi: template: arg1:1:3: executing "arg1" at : error calling output: /usr/bin/false: exit status 1 [exit status 1] # test fromToml template function (0.295s) > exec chezmoi execute-template '{{ (fromToml "[section]\nkey = \"value\"").section.key }}' [stdout] value> stdout '^value$' # test toToml template function (0.320s) > exec chezmoi execute-template '{{ dict "key" "value" | toToml }}' [stdout] key = 'value' > stdout '^key = .value.$' # test that the toPrettyJson template function does not escape HTML characters, see https://github.com/golang/go/blob/7a6ddbb425218b2f4866478d0c673ba82c8438e6/src/encoding/json/encode.go#L48-L55 (0.354s) > exec chezmoi execute-template '{{ dict "a" (dict "b" "&") | toPrettyJson " " }}' [stdout] { "a": { "b": "&" } } > cmp stdout golden/toPrettyJson # test fromYaml template function (0.302s) > exec chezmoi execute-template '{{ (fromYaml "key1: value1\nkey2: value2").key2 }}' [stdout] value2> stdout '^value2$' # test toYaml template function (0.300s) > exec chezmoi execute-template '{{ dict "key" "value" | toYaml }}' [stdout] key: value > stdout '^key: value$' PASS === NAME TestScript/issue2695 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi status returns an error when the JSON config file is invalid (0.968s) > ! exec chezmoi status [stderr] chezmoi: invalid config: $WORK/home/user/.config/chezmoi/chezmoi.json: invalid character 'u' looking for beginning of value [exit status 1] > stderr 'invalid config' > ! stderr 'json.*json' # check that chezmoi doctor warns about invalid JSON config files (2.280s) > ! exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:34Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable error config-file ~/.config/chezmoi/chezmoi.json: ~/.config/chezmoi/chezmoi.json: invalid character 'u' looking for beginning of value error source-dir open ~/.local/share/chezmoi: no such file or directory ok suspicious-entries ~/.local/share/chezmoi: no such file or directory error working-tree open ~/.local/share/chezmoi: no such file or directory ok dest-dir ~ is a directory ok umask 022 failed cd-command exec: "$WORK/bin/shell": stat $WORK/bin/shell: no such file or directory ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found /usr/bin/git, version 2.43.1 warning merge-command vimdiff not found in $PATH failed shell-command exec: "$WORK/bin/shell": stat $WORK/bin/shell: no such file or directory ok shell-args $WORK/bin/shell info age-command age not found in $PATH ok gpg-command found /usr/bin/gpg, version 2.4.4 info pinentry-command not set info 1password-command op not found in $PATH info bitwarden-command bw not found in $PATH info bitwarden-secrets-command bws not found in $PATH info dashlane-command dcli not found in $PATH info doppler-command doppler not found in $PATH info gopass-command gopass not found in $PATH info keepassxc-command keepassxc-cli not found in $PATH info keepassxc-db not set info keeper-command keeper not found in $PATH info lastpass-command lpass not found in $PATH info pass-command pass not found in $PATH info passhole-command ph not found in $PATH info rbw-command rbw not found in $PATH info vault-command vault not found in $PATH info vlt-command vlt not found in $PATH info secret-command not set [exit status 1] > stdout 'error\s+config-file\s+.*invalid character' > chhome home2/user # test that chezmoi status returns an error when the TOML config file is invalid (0.692s) > ! exec chezmoi status [stderr] chezmoi: invalid config: $WORK/home2/user/.config/chezmoi/chezmoi.toml: toml: incomplete number [exit status 1] > stderr 'invalid config' > ! stderr 'chezmoi\.toml.*chezmoi\.toml' # check that chezmoi doctor warns about invalid TOML config files (18.311s) > ! exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:37Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable error config-file ~/.config/chezmoi/chezmoi.toml: ~/.config/chezmoi/chezmoi.toml: toml: incomplete number error source-dir open ~/.local/share/chezmoi: no such file or directory ok suspicious-entries ~/.local/share/chezmoi: no such file or directory error working-tree open ~/.local/share/chezmoi: no such file or directory ok dest-dir ~ is a directory ok umask 022 failed cd-command exec: "$WORK/bin/shell": stat $WORK/bin/shell: no such file or directory ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found /usr/bin/git, version 2.43.1 warning merge-command vimdiff not found in $PATH failed shell-command exec: "$WORK/bin/shell": stat $WORK/bin/shell: no such file or directory ok shell-args $WORK/bin/shell info age-command age not found in $PATH ok gpg-command found /usr/bin/gpg, version 2.4.4 info pinentry-command not set info 1password-command op not found in $PATH info bitwarden-command bw not found in $PATH info bitwarden-secrets-command bws not found in $PATH info dashlane-command dcli not found in $PATH info doppler-command doppler not found in $PATH info gopass-command gopass not found in $PATH info keepassxc-command keepassxc-cli not found in $PATH info keepassxc-db not set info keeper-command keeper not found in $PATH info lastpass-command lpass not found in $PATH info pass-command pass not found in $PATH info passhole-command ph not found in $PATH info rbw-command rbw not found in $PATH info vault-command vault not found in $PATH info vlt-command vlt not found in $PATH info secret-command not set [exit status 1] > stdout 'error\s+config-file\s+.*incomplete number' > chhome home3/user # test that chezmoi status returns an error when the YAML config file is invalid (0.296s) > ! exec chezmoi status [stderr] chezmoi: invalid config: $WORK/home3/user/.config/chezmoi/chezmoi.yaml: yaml: unmarshal errors: line 1: cannot unmarshal !!str `string` into map[string]interface {} [exit status 1] > stderr 'invalid config' > ! stderr 'chezmoi\.yaml.*chezmoi\.yaml' # check that chezmoi doctor warns about invalid YAML config files (1.589s) > ! exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:55Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable error config-file ~/.config/chezmoi/chezmoi.yaml: ~/.config/chezmoi/chezmoi.yaml: yaml: unmarshal errors: line 1: cannot unmarshal !!str `string` into map[string]interface {} error source-dir open ~/.local/share/chezmoi: no such file or directory ok suspicious-entries ~/.local/share/chezmoi: no such file or directory error working-tree open ~/.local/share/chezmoi: no such file or directory ok dest-dir ~ is a directory ok umask 022 failed cd-command exec: "$WORK/bin/shell": stat $WORK/bin/shell: no such file or directory ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found /usr/bin/git, version 2.43.1 warning merge-command vimdiff not found in $PATH failed shell-command exec: "$WORK/bin/shell": stat $WORK/bin/shell: no such file or directory ok shell-args $WORK/bin/shell info age-command age not found in $PATH ok gpg-command found /usr/bin/gpg, version 2.4.4 info pinentry-command not set info 1password-command op not found in $PATH info bitwarden-command bw not found in $PATH info bitwarden-secrets-command bws not found in $PATH info dashlane-command dcli not found in $PATH info doppler-command doppler not found in $PATH info gopass-command gopass not found in $PATH info keepassxc-command keepassxc-cli not found in $PATH info keepassxc-db not set info keeper-command keeper not found in $PATH info lastpass-command lpass not found in $PATH info pass-command pass not found in $PATH info passhole-command ph not found in $PATH info rbw-command rbw not found in $PATH info vault-command vault not found in $PATH info vlt-command vlt not found in $PATH info secret-command not set [exit status 1] > stdout 'error\s+config-file\s+.*unmarshal errors' PASS === NAME TestScript/issue2649 testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell # test that chezmoi init clones a public dotfiles repo if git is installed (33.717s) > [exec:git] exec chezmoi init --use-builtin-git=false chezmoi [stderr] Cloning into '$WORK/home/user/.local/share/chezmoi'... fatal: unable to access 'https://github.com/chezmoi/dotfiles.git/': OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 0 chezmoi: exit status 128 [exit status 1] FAIL: testdata/scripts/issue2649.txtar:2: unexpected command failure === NAME TestScript/doctor_unix testscript.go:558: WORK=$WORK PATH=$WORK/bin:/tmp/testscript-main3957720979/bin:/usr/lib/go/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl GOTRACEBACK=system HOME=$WORK/home/user TMPDIR=$WORK/.tmp devnull=/dev/null /=/ :=: $=$ exe= CHEZMOICONFIGDIR=$WORK/home/user/.config/chezmoi CHEZMOISOURCEDIR=$WORK/home/user/.local/share/chezmoi CHEZMOI_GITHUB_TOKEN= EDITOR=$WORK/bin/editor SHELL=$WORK/bin/shell > [windows] skip 'UNIX only' > chmod 755 bin/age > chmod 755 bin/bw > chmod 755 bin/bws > chmod 755 bin/dcli > chmod 755 bin/doppler > chmod 755 bin/git > chmod 755 bin/gopass > chmod 755 bin/gpg > chmod 755 bin/keepassxc-cli > chmod 755 bin/keeper > chmod 755 bin/lpass > chmod 755 bin/op > chmod 755 bin/pass > chmod 755 bin/ph > chmod 755 bin/pinentry > chmod 755 bin/rbw > chmod 755 bin/secret > chmod 755 bin/shell > chmod 755 bin/vault > chmod 755 bin/vimdiff > chmod 755 bin/vlt > mkhomedir > mksourcedir # test that chezmoi doctor behaves as expected (3.178s) > exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:33Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable ok config-file ~/.config/chezmoi/chezmoi.toml, last modified 2024-02-12T22:22:32+08:00 ok source-dir ~/.local/share/chezmoi is a directory warning suspicious-entries ~/.local/share/chezmoi/dot_config/chezmoi/chezmoi.toml.tmpl ok working-tree ~/.local/share/chezmoi is a directory ok dest-dir ~ is a directory ok umask 022 ok cd-command found $WORK/bin/shell ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found $WORK/bin/git, version 2.29.2 ok merge-command found $WORK/bin/vimdiff ok shell-command found $WORK/bin/shell ok shell-args $WORK/bin/shell warning age-command found $WORK/bin/age, cannot parse version from (devel) ok gpg-command found $WORK/bin/gpg, version 2.2.23 ok pinentry-command found $WORK/bin/pinentry, version 1.2.0 ok 1password-command found $WORK/bin/op, version 2.0.0 ok bitwarden-command found $WORK/bin/bw, version 2023.10.0 ok bitwarden-secrets-command found $WORK/bin/bws, version 0.3.0 ok dashlane-command found $WORK/bin/dcli, version 1.0.0 ok doppler-command found $WORK/bin/doppler, version 3.65.1 ok gopass-command found $WORK/bin/gopass, version 1.10.1 ok keepassxc-command found $WORK/bin/keepassxc-cli, version 2.7.0 info keepassxc-db not set ok keeper-command found $WORK/bin/keeper, version 16.6.4 ok lastpass-command found $WORK/bin/lpass, version 1.3.3 ok pass-command found $WORK/bin/pass, version 1.7.3 ok passhole-command found $WORK/bin/ph, version 1.10.0 ok rbw-command found $WORK/bin/rbw, version 1.7.0 ok vault-command found $WORK/bin/vault, version 1.5.5 ok vlt-command found $WORK/bin/vlt, version 0.2.1 ok secret-command found $WORK/bin/secret > stdout '^ok\s+version\s+' > stdout '^\w+\s+latest-version\s+' > stdout '^ok\s+os-arch\s+' > ! stdout '^\S+\s+systeminfo\s+' > stdout '^ok\s+uname\s+' > stdout '^ok\s+config-file\s+' > stdout '^ok\s+source-dir\s+' > stdout '^warning\s+suspicious-entries\s+' > stdout '^ok\s+dest-dir\s+' > stdout '^ok\s+shell-command\s+' > stdout '^ok\s+shell-args\s+' > stdout '^ok\s+cd-command\s+' > stdout '^ok\s+cd-args\s+' > stdout '^ok\s+edit-command\s+' > stdout '^ok\s+edit-args\s+' > stdout '^ok\s+git-command\s+' > stdout '^ok\s+merge-command\s+' > stdout '^warning\s+age-command\s+' > stdout '^ok\s+gpg-command\s+' > stdout '^ok\s+pinentry-command\s+' > stdout '^ok\s+1password-command\s+' > stdout '^ok\s+bitwarden-command\s+' > stdout '^ok\s+bitwarden-secrets-command\s+' > stdout '^ok\s+dashlane-command\s+' > stdout '^ok\s+doppler-command\s+' > stdout '^ok\s+gopass-command\s+' > stdout '^ok\s+keepassxc-command\s+' > stdout '^info\s+keepassxc-db\s+' > stdout '^ok\s+keeper-command\s+' > stdout '^ok\s+passhole-command\s+' > stdout '^ok\s+lastpass-command\s+' > stdout '^ok\s+pass-command\s+' > stdout '^ok\s+rbw-command\s+' > stdout '^ok\s+vault-command\s+' > stdout '^ok\s+vlt-command\s+' > stdout '^ok\s+secret-command\s+' > chhome home2/user # test that chezmoi doctor warns about missing directories on an empty system (2.857s) > ! exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:36Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable ok config-file no config file found error source-dir open ~/.local/share/chezmoi: no such file or directory ok suspicious-entries ~/.local/share/chezmoi: no such file or directory error working-tree open ~/.local/share/chezmoi: no such file or directory ok dest-dir ~ is a directory ok umask 022 ok cd-command found $WORK/bin/shell ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found $WORK/bin/git, version 2.29.2 ok merge-command found $WORK/bin/vimdiff ok shell-command found $WORK/bin/shell ok shell-args $WORK/bin/shell warning age-command found $WORK/bin/age, cannot parse version from (devel) ok gpg-command found $WORK/bin/gpg, version 2.2.23 info pinentry-command not set ok 1password-command found $WORK/bin/op, version 2.0.0 ok bitwarden-command found $WORK/bin/bw, version 2023.10.0 ok bitwarden-secrets-command found $WORK/bin/bws, version 0.3.0 ok dashlane-command found $WORK/bin/dcli, version 1.0.0 ok doppler-command found $WORK/bin/doppler, version 3.65.1 ok gopass-command found $WORK/bin/gopass, version 1.10.1 ok keepassxc-command found $WORK/bin/keepassxc-cli, version 2.7.0 info keepassxc-db not set ok keeper-command found $WORK/bin/keeper, version 16.6.4 ok lastpass-command found $WORK/bin/lpass, version 1.3.3 ok pass-command found $WORK/bin/pass, version 1.7.3 ok passhole-command found $WORK/bin/ph, version 1.10.0 ok rbw-command found $WORK/bin/rbw, version 1.7.0 ok vault-command found $WORK/bin/vault, version 1.5.5 ok vlt-command found $WORK/bin/vlt, version 0.2.1 info secret-command not set [exit status 1] > stdout '^ok\s+config-file\s+' > stdout '^error\s+source-dir\s+' > stdout '^ok\s+suspicious-entries\s+' > chhome home3/user # test that chezmoi doctor warns about suspicious entries (44.730s) > exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:22:39Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable ok config-file no config file found ok source-dir ~/.local/share/chezmoi is a directory warning suspicious-entries ~/.local/share/chezmoi/.chezmoisuspicious ok working-tree ~/.local/share/chezmoi is a directory ok dest-dir ~ is a directory ok umask 022 ok cd-command found $WORK/bin/shell ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found $WORK/bin/git, version 2.29.2 ok merge-command found $WORK/bin/vimdiff ok shell-command found $WORK/bin/shell ok shell-args $WORK/bin/shell warning age-command found $WORK/bin/age, cannot parse version from (devel) ok gpg-command found $WORK/bin/gpg, version 2.2.23 info pinentry-command not set ok 1password-command found $WORK/bin/op, version 2.0.0 ok bitwarden-command found $WORK/bin/bw, version 2023.10.0 ok bitwarden-secrets-command found $WORK/bin/bws, version 0.3.0 ok dashlane-command found $WORK/bin/dcli, version 1.0.0 ok doppler-command found $WORK/bin/doppler, version 3.65.1 ok gopass-command found $WORK/bin/gopass, version 1.10.1 ok keepassxc-command found $WORK/bin/keepassxc-cli, version 2.7.0 info keepassxc-db not set ok keeper-command found $WORK/bin/keeper, version 16.6.4 ok lastpass-command found $WORK/bin/lpass, version 1.3.3 ok pass-command found $WORK/bin/pass, version 1.7.3 ok passhole-command found $WORK/bin/ph, version 1.10.0 ok rbw-command found $WORK/bin/rbw, version 1.7.0 ok vault-command found $WORK/bin/vault, version 1.5.5 ok vlt-command found $WORK/bin/vlt, version 0.2.1 info secret-command not set > stdout '^warning\s+suspicious-entries\s+' > chhome home4/user # test that chezmoi doctor does not print a warning about multiple config files (21.416s) > ! exec chezmoi doctor [stdout] RESULT CHECK MESSAGE ok version v2.0.0+test, commit HEAD, built at 2024-02-12T14:23:23Z, built by testscript warning latest-version v2.46.1 ok os-arch linux/riscv64 (Arch Linux) ok uname Linux arch-nspawn-498843 6.1.61-3-sophgo-multi-08357-g369f7207fe69 #1 SMP Sat, 30 Dec 2023 06:54:24 +0000 riscv64 GNU/Linux ok go-version go1.22.0 (gc) ok executable /tmp/testscript-main3957720979/bin/chezmoi ok upgrade-method replace-executable warning config-file ~/.config/chezmoi/chezmoi.json and ~/.config/chezmoi/chezmoi.yaml: multiple config files error source-dir open ~/.local/share/chezmoi: no such file or directory ok suspicious-entries ~/.local/share/chezmoi: no such file or directory error working-tree open ~/.local/share/chezmoi: no such file or directory ok dest-dir ~ is a directory ok umask 022 ok cd-command found $WORK/bin/shell ok cd-args $WORK/bin/shell info diff-command not set ok edit-command found $WORK/bin/editor ok edit-args $WORK/bin/editor ok git-command found $WORK/bin/git, version 2.29.2 ok merge-command found $WORK/bin/vimdiff ok shell-command found $WORK/bin/shell ok shell-args $WORK/bin/shell warning age-command found $WORK/bin/age, cannot parse version from (devel) ok gpg-command found $WORK/bin/gpg, version 2.2.23 info pinentry-command not set ok 1password-command found $WORK/bin/op, version 2.0.0 ok bitwarden-command found $WORK/bin/bw, version 2023.10.0 ok bitwarden-secrets-command found $WORK/bin/bws, version 0.3.0 ok dashlane-command found $WORK/bin/dcli, version 1.0.0 ok doppler-command found $WORK/bin/doppler, version 3.65.1 ok gopass-command found $WORK/bin/gopass, version 1.10.1 ok keepassxc-command found $WORK/bin/keepassxc-cli, version 2.7.0 info keepassxc-db not set ok keeper-command found $WORK/bin/keeper, version 16.6.4 ok lastpass-command found $WORK/bin/lpass, version 1.3.3 ok pass-command found $WORK/bin/pass, version 1.7.3 ok passhole-command found $WORK/bin/ph, version 1.10.0 ok rbw-command found $WORK/bin/rbw, version 1.7.0 ok vault-command found $WORK/bin/vault, version 1.5.5 ok vlt-command found $WORK/bin/vlt, version 0.2.1 info secret-command not set [exit status 1] > stdout '^warning\s+config-file\s+.*multiple config files' > ! stderr . PASS --- FAIL: TestScript (0.04s) --- SKIP: TestScript/upgrade (0.01s) --- SKIP: TestScript/scriptorder_windows (0.02s) --- SKIP: TestScript/symlinks_windows (0.01s) --- SKIP: TestScript/scriptruby (0.04s) --- SKIP: TestScript/modifyencrypted (0.33s) --- SKIP: TestScript/scriptonce_windows (1.47s) --- PASS: TestScript/git (1.52s) --- SKIP: TestScript/githubtemplatefuncs (1.58s) --- SKIP: TestScript/scriptinterpreterstemplate (1.64s) --- SKIP: TestScript/chattrencrypted (1.71s) --- SKIP: TestScript/state_windows (1.71s) --- SKIP: TestScript/cd_windows (0.13s) --- SKIP: TestScript/scriptsubdir_windows (1.72s) --- SKIP: TestScript/ageencryption (1.85s) --- SKIP: TestScript/mackupbrew_darwin (1.98s) --- SKIP: TestScript/mergeencryptedage_unix (1.95s) --- SKIP: TestScript/archivezip (2.02s) --- SKIP: TestScript/debug (0.05s) --- SKIP: TestScript/encryptiontemplatefuncs (1.74s) --- SKIP: TestScript/modify_windows (2.52s) --- SKIP: TestScript/ageencryptionsymmetric (2.38s) --- PASS: TestScript/nosourcedir (2.52s) --- PASS: TestScript/generatefigspec (2.54s) --- PASS: TestScript/ignored (2.59s) --- PASS: TestScript/plugin (2.55s) --- SKIP: TestScript/diffcommand_windows (2.45s) --- SKIP: TestScript/script_windows (2.46s) --- SKIP: TestScript/modifypython_windows (2.56s) --- SKIP: TestScript/mackuppip_darwin (2.57s) --- SKIP: TestScript/mackuppipx_darwin (2.58s) --- PASS: TestScript/issue3349 (2.40s) --- SKIP: TestScript/mackupmacports_darwin (2.50s) --- SKIP: TestScript/scriptinterpreters_windows (2.55s) --- PASS: TestScript/sourcedir (2.70s) --- PASS: TestScript/issue3374 (2.74s) --- PASS: TestScript/passhole (2.92s) --- PASS: TestScript/scripttempdir (3.01s) --- PASS: TestScript/externaldir (2.94s) --- PASS: TestScript/version (3.12s) --- PASS: TestScript/license (3.09s) --- PASS: TestScript/applyverbose (3.40s) --- PASS: TestScript/addattributes (3.31s) --- SKIP: TestScript/builtinage (0.01s) --- PASS: TestScript/issue3005 (0.83s) --- PASS: TestScript/pass (3.44s) --- PASS: TestScript/externalzip (3.27s) --- PASS: TestScript/dashlane (1.75s) --- PASS: TestScript/issue3510 (0.90s) --- PASS: TestScript/issue2858 (3.39s) --- PASS: TestScript/archivetar (3.44s) --- PASS: TestScript/catconfig (3.53s) --- PASS: TestScript/externalfilter (3.52s) --- PASS: TestScript/lastpass (3.52s) --- PASS: TestScript/runscriptdir_unix (3.72s) --- PASS: TestScript/issue3163 (1.14s) --- SKIP: TestScript/doctor_windows (0.01s) --- SKIP: TestScript/create (1.20s) --- PASS: TestScript/rbw (3.81s) --- PASS: TestScript/edithardlink (2.17s) --- PASS: TestScript/applyremove (3.87s) --- PASS: TestScript/issue2752 (0.73s) --- PASS: TestScript/tilde (3.72s) --- PASS: TestScript/literal (3.75s) --- PASS: TestScript/applyexact (3.88s) --- PASS: TestScript/noencryption (3.97s) --- PASS: TestScript/script (3.86s) --- PASS: TestScript/hooks (3.96s) --- PASS: TestScript/issue3126 (1.09s) --- PASS: TestScript/gopass (3.94s) --- PASS: TestScript/issue3064 (0.66s) --- PASS: TestScript/options (4.15s) --- PASS: TestScript/issue3206 (1.58s) --- PASS: TestScript/issue796 (1.79s) --- PASS: TestScript/secret (4.33s) --- PASS: TestScript/issue3240 (4.30s) --- PASS: TestScript/issue3008 (0.78s) --- PASS: TestScript/help (4.30s) --- PASS: TestScript/generate (4.39s) --- PASS: TestScript/scriptorder_unix (4.39s) --- PASS: TestScript/issue2577 (0.65s) --- PASS: TestScript/keepassxc (4.44s) --- SKIP: TestScript/scriptpython (0.01s) --- PASS: TestScript/textconv (4.56s) --- PASS: TestScript/issue2995 (0.66s) --- PASS: TestScript/modesymlink (4.53s) --- PASS: TestScript/mergeall_unix (4.56s) --- PASS: TestScript/removedir (4.60s) --- PASS: TestScript/keepgoing (4.44s) --- SKIP: TestScript/issue1794 (0.01s) --- PASS: TestScript/issue3051 (1.12s) --- PASS: TestScript/issue3418 (2.04s) --- PASS: TestScript/issue2300 (0.73s) --- PASS: TestScript/issue2599 (0.91s) --- PASS: TestScript/data (2.65s) --- PASS: TestScript/issue2942 (1.19s) --- PASS: TestScript/templatedirectives (4.58s) --- PASS: TestScript/keeper (4.74s) --- PASS: TestScript/dumpconfig (1.19s) --- PASS: TestScript/issue3257 (4.83s) --- PASS: TestScript/issue2315 (1.04s) --- PASS: TestScript/issue2609 (1.20s) --- PASS: TestScript/issue2137 (2.17s) --- PASS: TestScript/dumpyaml (1.51s) --- PASS: TestScript/applychmod_unix (4.84s) --- PASS: TestScript/applystate (4.87s) --- PASS: TestScript/issue3232 (2.46s) --- PASS: TestScript/issue3414 (5.06s) --- PASS: TestScript/issue2354 (1.26s) --- PASS: TestScript/vault (1.77s) --- PASS: TestScript/issue1866 (0.67s) --- PASS: TestScript/issue2954 (1.01s) --- PASS: TestScript/issue2283 (1.28s) --- PASS: TestScript/issue1666 (0.71s) --- PASS: TestScript/issue3127 (2.88s) --- PASS: TestScript/issue2977 (1.53s) --- PASS: TestScript/issue2964 (1.39s) --- PASS: TestScript/issue2132 (1.38s) --- PASS: TestScript/applysourcepath (5.54s) --- PASS: TestScript/purge (5.56s) --- PASS: TestScript/issue2302 (1.56s) --- PASS: TestScript/editconfig (3.64s) --- PASS: TestScript/templatedata (5.61s) --- PASS: TestScript/issue2177 (1.24s) --- PASS: TestScript/addautotemplate (3.87s) --- PASS: TestScript/issue3268 (5.71s) --- PASS: TestScript/issue1237 (1.95s) --- PASS: TestScript/issue2380 (1.10s) --- PASS: TestScript/scriptsdir_unix (5.76s) --- PASS: TestScript/externaldiff (5.85s) --- PASS: TestScript/issue2573 (1.85s) --- PASS: TestScript/issue2500 (1.31s) --- PASS: TestScript/importxz (1.20s) --- PASS: TestScript/issue2820 (2.84s) --- PASS: TestScript/issue2016 (1.53s) --- PASS: TestScript/importtarzst (1.03s) --- PASS: TestScript/exclude (5.83s) --- PASS: TestScript/importzip (1.27s) --- PASS: TestScript/scriptperl (1.24s) --- PASS: TestScript/applytype (5.95s) --- PASS: TestScript/issue2937 (1.55s) --- PASS: TestScript/merge_unix (6.12s) --- PASS: TestScript/externalencrypted (6.02s) --- PASS: TestScript/root (6.27s) --- PASS: TestScript/issue3325 (6.10s) --- PASS: TestScript/scriptsubdir_unix (6.41s) --- PASS: TestScript/issue3415 (6.43s) --- PASS: TestScript/editconfigtemplate (4.92s) --- PASS: TestScript/issue3113 (3.61s) --- PASS: TestScript/issue1869 (2.29s) --- PASS: TestScript/issue2934 (2.21s) --- PASS: TestScript/issue1365 (2.12s) --- PASS: TestScript/issue2510 (2.13s) --- PASS: TestScript/issue2861 (1.91s) --- PASS: TestScript/workingtree (6.99s) --- PASS: TestScript/scriptenv (2.27s) --- PASS: TestScript/sourcepath (7.12s) --- PASS: TestScript/addsecrets (7.45s) --- PASS: TestScript/re-add (7.66s) --- PASS: TestScript/symlinks (7.89s) --- PASS: TestScript/ejson (6.40s) --- PASS: TestScript/issue2628 (4.77s) --- PASS: TestScript/gpg (8.54s) --- PASS: TestScript/addencrypted (8.80s) --- PASS: TestScript/externalguess (8.85s) --- PASS: TestScript/externalarchiveinclude (8.93s) --- PASS: TestScript/applyskipencrypted (8.98s) --- SKIP: TestScript/edgecases (5.62s) --- PASS: TestScript/issue2092 (4.80s) --- PASS: TestScript/import (4.47s) --- PASS: TestScript/issue1832 (4.78s) --- PASS: TestScript/state (9.33s) --- PASS: TestScript/templatevars (9.45s) --- PASS: TestScript/bitwarden (4.97s) --- PASS: TestScript/issue2427 (5.37s) --- PASS: TestScript/apply (9.95s) --- PASS: TestScript/hcpvaultsecrets (10.09s) --- PASS: TestScript/dumpjson (7.03s) --- PASS: TestScript/remove (10.19s) --- PASS: TestScript/issue3371 (7.77s) --- PASS: TestScript/edgecasesumask (7.19s) --- PASS: TestScript/issue3421 (7.99s) --- PASS: TestScript/targetpath (10.64s) --- PASS: TestScript/errors (11.00s) --- PASS: TestScript/completion_unix (8.20s) --- PASS: TestScript/issue2865 (6.57s) --- PASS: TestScript/unmanaged (11.28s) --- PASS: TestScript/state_unix (11.34s) --- PASS: TestScript/cat (9.35s) --- PASS: TestScript/issue1213 (7.06s) --- PASS: TestScript/completion (11.37s) --- PASS: TestScript/issue1161 (7.11s) --- PASS: TestScript/ignore (11.51s) --- PASS: TestScript/config (9.08s) --- PASS: TestScript/onepassword2 (11.72s) --- PASS: TestScript/scriptonchange_unix (12.13s) --- PASS: TestScript/forget (12.16s) --- PASS: TestScript/status (12.27s) --- PASS: TestScript/edit (12.45s) --- PASS: TestScript/scriptonce_unix (12.39s) --- PASS: TestScript/script_unix (12.46s) --- PASS: TestScript/cd_unix (11.05s) --- PASS: TestScript/mergeencryptedgpg_unix (12.76s) --- PASS: TestScript/diffcommand_unix (11.03s) --- PASS: TestScript/umask_unix (13.02s) --- PASS: TestScript/configstate (10.60s) --- PASS: TestScript/autocommit (13.25s) --- PASS: TestScript/autopush (13.45s) --- PASS: TestScript/externalgitrepo (13.31s) --- PASS: TestScript/gpgencryptionsymmetric (13.99s) --- PASS: TestScript/builtingit (12.21s) --- PASS: TestScript/age (14.22s) --- PASS: TestScript/modify_unix (14.51s) --- PASS: TestScript/inittemplatefuncs (10.11s) --- PASS: TestScript/diff (13.20s) --- PASS: TestScript/doppler (11.48s) --- PASS: TestScript/external (15.47s) --- PASS: TestScript/initconfig (11.07s) --- PASS: TestScript/add (15.92s) --- PASS: TestScript/gpgencryption (15.96s) --- PASS: TestScript/update (16.50s) --- PASS: TestScript/managed (16.50s) --- PASS: TestScript/verify (14.04s) --- PASS: TestScript/executetemplate (18.56s) --- PASS: TestScript/init (15.20s) --- PASS: TestScript/chattr (19.56s) --- PASS: TestScript/templatefuncs (24.17s) --- PASS: TestScript/issue2695 (24.16s) --- FAIL: TestScript/issue2649 (33.73s) --- PASS: TestScript/doctor_unix (72.24s) FAIL FAIL github.com/twpayne/chezmoi/v2/internal/cmd 84.127s === RUN TestGoToolDistList --- PASS: TestGoToolDistList (0.16s) PASS ok github.com/twpayne/chezmoi/v2/internal/cmds/generate-install.sh 0.357s === RUN TestCommitRx --- PASS: TestCommitRx (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/cmds/lint-commit-messages 0.132s === RUN TestLintData === RUN TestLintData/0 === RUN TestLintData/1 === RUN TestLintData/2 === RUN TestLintData/3 === RUN TestLintData/4 --- PASS: TestLintData (0.00s) --- PASS: TestLintData/0 (0.00s) --- PASS: TestLintData/1 (0.00s) --- PASS: TestLintData/2 (0.00s) --- PASS: TestLintData/3 (0.00s) --- PASS: TestLintData/4 (0.00s) PASS ok github.com/twpayne/chezmoi/v2/internal/cmds/lint-whitespace 0.177s FAIL ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/root13/build receiving incremental file list chezmoi-2.46.1-1-riscv64-build.log chezmoi-2.46.1-1-riscv64-check.log chezmoi-2.46.1-1-riscv64-prepare.log sent 81 bytes received 102,671 bytes 41,100.80 bytes/sec total size is 839,135 speedup is 8.17