Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from twpayne:master #282

Open
wants to merge 1,637 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
1637 commits
Select commit Hold shift + click to select a range
c209c2a
feat: Promote edit --watch to stable
twpayne Jan 16, 2024
24c0ea2
feat: Promote Doppler template functions to stable
twpayne Jan 16, 2024
114030c
feat: Promote HCP Vault Secrets template functions to stable
twpayne Jan 16, 2024
85983f0
feat: Promote hooks to stable
twpayne Jan 16, 2024
80717f4
docs: Fix names of age recipients files config variables
twpayne Jan 17, 2024
14b4a56
chore: Fix grammar
twpayne Jan 18, 2024
53f7b92
feat: Add re-add --recursive flag and make it the default
twpayne Jan 17, 2024
2e3bd95
docs: add link
dpprdan Jan 19, 2024
74d6b2a
fix: Reduce injection of terminal control characters into keepassxc-c…
twpayne Jan 14, 2024
89813b0
chore: Remove unused function
twpayne Jan 20, 2024
9c273eb
chore: Update dependencies
twpayne Jan 21, 2024
031b267
fix: Handle more keepassxc-cli errors
twpayne Jan 20, 2024
5e7c295
docs: Add links to article and video
twpayne Jan 22, 2024
aa089fa
chore: Add developer note on testing
twpayne Jan 22, 2024
ecf706d
chore: Add missing double quote
twpayne Jan 22, 2024
f0a7529
chore: Bump github.com/twpayne/go-vfs to v5
twpayne Jan 22, 2024
569601a
fix: Change init to default to --config if --config-path is absent
paltherr Jan 16, 2024
991ed63
chore: Improve argument names
twpayne Jan 24, 2024
efcf32d
feat: Support rage as an alternative age encryption command
twpayne Jan 24, 2024
8dd6c86
docs: combine testing and debugging templates
dpprdan Jan 23, 2024
2dffe64
docs: links to testing-templates
dpprdan Jan 23, 2024
fd2cf8f
chore: Tidy up testscripts
twpayne Jan 25, 2024
c7539b0
feat: Build for Android (Termux)
twpayne Jan 23, 2024
15f4eb1
fix: Defer lookup of git in $PATH for git-repo externals
twpayne Jan 25, 2024
65a5aef
chore: Update GitHub Actions
twpayne Jan 25, 2024
d6dccfd
chore: Update dependencies
twpayne Jan 25, 2024
fa8da69
chore: Fix broken link
twpayne Jan 25, 2024
1418f74
docs: Fix broken release history page
twpayne Jan 25, 2024
431ec39
feat: Set CHEZMOI_SOURCE_FILE env var for scripts
twpayne Jan 27, 2024
baeaf6b
docs: typo
dpprdan Jan 29, 2024
6e3d06b
chore(deps): bump github/codeql-action from 3.22.12 to 3.23.2
dependabot[bot] Feb 1, 2024
5c152fe
chore(deps): bump sigstore/cosign-installer from 3.3.0 to 3.4.0
dependabot[bot] Feb 1, 2024
4708692
chore(deps): bump mkdocs-material from 9.5.3 to 9.5.6 in /assets
dependabot[bot] Feb 1, 2024
deb5adf
chore(deps-dev): bump ruff from 0.1.9 to 0.1.15 in /assets
dependabot[bot] Feb 1, 2024
d2895b5
chore: Remove outdated documentation on 1Password CLI v1
twpayne Feb 2, 2024
ffae4ec
chore: Use slices.Clone
twpayne Feb 2, 2024
4443acf
chore: Skip building Chocolatey packages in local release tests
twpayne Feb 5, 2024
8a20f91
feat: Add update.apply configuration variable
twpayne Feb 5, 2024
1743224
chore: Update dependencies
twpayne Feb 5, 2024
3697fc9
chore: Use per-job permissions for GitHub Actions
twpayne Feb 6, 2024
e4f462a
chore: Update GitHub Actions
twpayne Feb 6, 2024
42aae14
chore: Run actions on later version of Ubuntu, where possible
twpayne Feb 6, 2024
86ebd27
chore: Run main action daily
twpayne Feb 6, 2024
df18930
chore: Rename internal module
twpayne Jan 31, 2024
d8177e7
chore: Make Go 1.21 the required minimum version of Go
twpayne Jan 31, 2024
a846e2c
chore: Use standard maps and slices packages
twpayne Jan 31, 2024
b366e6e
chore: Build with Go 1.22
twpayne Feb 7, 2024
111553c
chore: Bump golangci-lint to v1.56.0
twpayne Feb 7, 2024
e40dc13
chore: Switch to log/slog for logging
twpayne Feb 7, 2024
5a20eeb
chore: Improve context handling
twpayne Feb 11, 2024
0eb98a9
fix: Fix age/rage check in doctor command
razvanazamfirei Feb 11, 2024
a22c53e
chore: Update GitHub Actions
twpayne Feb 11, 2024
04e8929
chore: Update dependencies
twpayne Feb 11, 2024
c65f66a
chore: Update tools
twpayne Feb 11, 2024
a3ec854
chore: Exclude chore(deps-dev) from changelog
twpayne Feb 11, 2024
f52062e
docs: Cross link "See REF" in config variables doc
halostatue Feb 11, 2024
df00bf2
chore: Make some tests pass on Windows
twpayne Feb 13, 2024
6788c54
feat: 1Password Secrets Automation Support
halostatue Feb 11, 2024
ccde612
fix: Prioritize $HOME when Cygwin or msys2 is detected
twpayne Feb 13, 2024
302a3b8
fix: Move documentation of --output flag to correct section
twpayne Feb 14, 2024
93766a4
chore: Tidy up --use-builtin-diff flag
twpayne Feb 14, 2024
b5fc7b6
docs: Document config vars for command-specific flags
twpayne Feb 14, 2024
1c0bb46
chore: Tidy up flag handling
twpayne Feb 14, 2024
f54a3ec
chore: Centralize flag completion functions
twpayne Feb 14, 2024
0269f80
docs: Update docs on auto applying changes on edit in VIM
twpayne Feb 15, 2024
d9938b1
chore: Work around ruamel.yaml errors when formatting YAML
twpayne Feb 16, 2024
dba574d
chore: Improve logging and error messages for spawned processes
twpayne Feb 16, 2024
d14bdd5
fix: Use uname -o to detect Android in install script
twpayne Feb 15, 2024
100905a
chore: Bump golangci-lint version
twpayne Feb 17, 2024
c9ddc84
chore: Remove owner/repo abstraction
twpayne Feb 16, 2024
c0b7e92
fix: Don't attempt to add entries in external_ directories
twpayne Feb 19, 2024
342fcbe
chore: Don't export methods on internal struct
twpayne Feb 19, 2024
8262e43
chore: Refactor install.ps1
bradenhilton Feb 15, 2024
1abcfa5
fix: Fix panic when merging unmanaged file
twpayne Feb 21, 2024
3e5f0c8
docs: Fix type of .chezmoi.kernel and .chezmoi.osRelease variables
twpayne Feb 22, 2024
5201ddc
fix: Don't leak internal default sentinel values in template data
twpayne Feb 22, 2024
0d6c4c2
chore: Separate installer CI tests
bradenhilton Feb 21, 2024
5b6b66c
chore: Update dependencies
twpayne Feb 24, 2024
a8ab853
chore: Update GitHub Actions
twpayne Feb 24, 2024
e925b0f
fix: Fix --keep-going flag for unmanaged command
twpayne Feb 24, 2024
16c803d
chore: Add forgotten test file
twpayne Feb 25, 2024
1e40807
chore: Fix struct tags
twpayne Feb 25, 2024
5224e11
fix: Fix marshaling of absolute paths
twpayne Feb 25, 2024
523fd84
fix: Fix marshaling of autobools
twpayne Feb 25, 2024
c6b867b
fix: Fix marshaling of severities
twpayne Feb 25, 2024
3b3541c
fix: Ensure default mode is set
twpayne Feb 25, 2024
39bd915
chore: Add config marshal/unmarshal roundtrip tests
twpayne Feb 25, 2024
5840318
chore: Fix broken relative links
bradenhilton Feb 26, 2024
959e580
chore: Exclude install.sh.tmpl from code changes
bradenhilton Feb 26, 2024
4504bc3
chore: Run daily checks four hours earlier
twpayne Feb 27, 2024
18c99c3
docs: Add link to video
twpayne Feb 28, 2024
5bb87f1
fix: a grammar mistake
Imzxhir Feb 28, 2024
1f44189
fix: Ensure that all .chezmoi.config template variables have simple t…
twpayne Feb 29, 2024
0405763
fix: Set CHEZMOI_ environment variables for plugins
twpayne Feb 29, 2024
285b8a3
chore: Update dependencies
twpayne Feb 29, 2024
57a66c7
chore: Update GitHub Actions
twpayne Feb 29, 2024
885487b
docs: Add link to blog post
twpayne Feb 29, 2024
b69d69c
chore(deps): bump golang/govulncheck-action from 1.0.1 to 1.0.2
dependabot[bot] Mar 1, 2024
bc22729
chore(deps-dev): bump ruff from 0.1.15 to 0.3.0 in /assets
dependabot[bot] Mar 1, 2024
cfc900a
chore(deps): bump mkdocs-material from 9.5.6 to 9.5.12 in /assets
dependabot[bot] Mar 1, 2024
dc99169
fix: Make splitList return []any
bradenhilton Feb 27, 2024
55ce668
chore(deps): bump github/codeql-action from 3.23.2 to 3.24.6
dependabot[bot] Mar 1, 2024
85d015b
docs: Refactor developer guide
twpayne Mar 1, 2024
59764c8
fix: Fix panic in unmanaged on some dir permission errors
twpayne Mar 3, 2024
4d4b17b
chore: Update dependencies
twpayne Mar 3, 2024
1ce6b2e
chore: Update GitHub Actions
twpayne Mar 3, 2024
3a0b19e
fix: Add missing newlines in error messages
twpayne Mar 3, 2024
f16703e
chore: Fix permissions for deploy-website step
twpayne Mar 3, 2024
ce46858
docs: Add link to article
twpayne Mar 3, 2024
fd6c7ae
chore: Build with Go 1.22.1
twpayne Mar 5, 2024
39be95d
chore: Space scheduled CI runs to avoid exceeding GitHub API quotas
twpayne Mar 8, 2024
956244d
chore: Fix typo in log message
twpayne Mar 8, 2024
fccc759
fix: Handle copies in automatic commit messages
twpayne Mar 8, 2024
db0c90a
chore: Update dependencies
twpayne Mar 8, 2024
c47dcfa
chore: Update GitHub Actions
twpayne Mar 8, 2024
eb62958
docs: Fix incomplete sentence in usage docs
twpayne Mar 10, 2024
30fb22a
chore: Group Dependabot updates
twpayne Mar 10, 2024
3fbc646
chore(deps): bump the actions group with 1 update
dependabot[bot] Mar 10, 2024
24cf355
chore(deps): bump the python group in /assets with 2 updates
dependabot[bot] Mar 10, 2024
c8dc9a4
fix: Explicitly tell user when then should use a config file template
twpayne Mar 10, 2024
490cc3a
docs: Add link to article
twpayne Mar 11, 2024
88b586d
fix: Remove fig support
twpayne Mar 14, 2024
f9eeeeb
chore: Add missing go.sum entries
twpayne Mar 16, 2024
f490429
fix: pass the `--needed` flag to pacman
aarondill Mar 16, 2024
ad77158
fix: Increase range of types accepted by promptChoice template function
twpayne Mar 27, 2024
06d8351
chore: Fix lock-threads GitHub Action
twpayne Mar 29, 2024
99f5ea2
chore: Update golangci-lint
twpayne Mar 29, 2024
b33959d
chore: Update dependencies
twpayne Mar 29, 2024
60cc314
chore: Update GitHub Actions
twpayne Mar 29, 2024
b366d0e
fix: Fix panic when adding children in exact_ dirs
twpayne Mar 30, 2024
5749974
chore: Skip tests that require a net connection when offline
twpayne Mar 30, 2024
8a83dcc
fix: Skip adding entries in external dirs instead of erroring
twpayne Mar 31, 2024
97f27d1
chore: Factor out and use common set implementation
twpayne Mar 31, 2024
ed0186f
chore: Use generic function in tests
twpayne Mar 31, 2024
2e4236c
fix: Don't traverse into ignored directories when adding files
twpayne Mar 31, 2024
0acd448
chore: Update dependencies
twpayne Mar 31, 2024
4f76edb
chore: Update golangci-lint config
twpayne Mar 31, 2024
3a3dd13
docs: Add links to articles
twpayne Mar 31, 2024
7ef2386
chore(deps): bump the python group in /assets with 2 updates
dependabot[bot] Apr 1, 2024
8b2a435
docs: Add install.doctor to related software
twpayne Apr 2, 2024
872c584
docs: Add troubleshooting entry on missing /bin/bash on Nix
twpayne Apr 3, 2024
027e329
chore(deps): bump the actions group with 3 updates
dependabot[bot] Apr 1, 2024
0f1158f
chore: Disable lock-threads GitHub Action temporarily
twpayne Apr 4, 2024
c10c730
chore: Build with Go 1.22.2
twpayne Apr 4, 2024
fb54305
chore: Update dependencies
twpayne Apr 4, 2024
4c30f6a
chore: Fix use of ireturn linter
twpayne Apr 4, 2024
d2ca5f0
chore: re-enable lock-threads GitHub Action
twpayne Apr 6, 2024
57c9d9f
chore: Update dependencies
twpayne Apr 9, 2024
b1f40b8
chore: Update GitHub Actions
twpayne Apr 9, 2024
6712140
chore: fix function names in comment
kindknow Apr 11, 2024
b4df44d
fix: Fix panic on empty external
twpayne Apr 12, 2024
d6ad485
fix: Fix potential panic when textconv interpreter is empty
twpayne Apr 12, 2024
313d232
chore: Fix function names in comments
momantech Apr 17, 2024
c67b821
chore: Update dependencies
twpayne Apr 17, 2024
ad74250
chore: Update GitHub Actions
twpayne Apr 17, 2024
89fab4b
docs: Fix origin URL in quick start guide
twpayne Apr 21, 2024
4a9d0e4
feat: Include name of target in error message
twpayne Apr 22, 2024
153ff43
fix: Better detect username on Android/Termux systems
twpayne Apr 23, 2024
38a41c6
chore: Fix internal joining of lines for tests
twpayne Apr 23, 2024
8e3f44c
chore: Add pathslist functionality
twpayne Apr 23, 2024
278e2be
feat: Add --tree flag to ignored command
twpayne Apr 23, 2024
91823e3
feat: Add --tree flag to managed command
twpayne Apr 23, 2024
2e04dcf
feat: Add --tree flag to unmanaged command
twpayne Apr 23, 2024
9c817ce
docs: Document --tree flag
twpayne Apr 23, 2024
8343e98
chore: Use fmt.Stringer internally
twpayne Apr 23, 2024
b1b40b2
docs: Add link to article
twpayne Apr 26, 2024
7dfcfcf
fix: Remove unmanaged files from exact_ directories containing extern…
twpayne Apr 26, 2024
3f41d57
chore: Update dependencies
twpayne Apr 26, 2024
cb162d6
chore: Update GitHub Actions
twpayne Apr 26, 2024
c758a1c
fix: Apply .chezmoiignore to dirs in external archives
twpayne Apr 26, 2024
6a90b3e
fix: Links section is broken in docs
koiralakiran1 Apr 27, 2024
a6e2d8e
chore: Bump github.com/twpayne/go-pinentry to v4
twpayne Apr 28, 2024
9d332c6
docs: Add link to article
twpayne Apr 29, 2024
9b57763
chore: Temporarily disable snapcraft builds
twpayne Apr 29, 2024
a5a982f
chore: Fix file exists errors when running golangci-lint GitHub Action
twpayne Apr 29, 2024
a49a7e0
chore: Disable buggy ireturn linter
twpayne Apr 29, 2024
a396e3a
feat: Add gitHubLatestReleaseAssetURL template function
twpayne Apr 29, 2024
9744229
chore(deps): bump the python group in /assets with 3 updates
dependabot[bot] May 1, 2024
cbeafae
chore(deps): bump the actions group with 3 updates
dependabot[bot] May 1, 2024
57485b9
chore(deps): bump golangci/golangci-lint-action from 4.0.0 to 5.1.0
dependabot[bot] May 1, 2024
5142cbd
chore(deps): bump github.com/alecthomas/assert/v2 in the go-prod group
dependabot[bot] May 1, 2024
a1196a7
chore: Update go.sum
twpayne May 1, 2024
6d64797
chore: Update golangci-lint
twpayne May 5, 2024
dce276c
chore: Update GitHub Actions
twpayne May 5, 2024
9adfbc4
chore: Update dependencies
twpayne May 5, 2024
37e74e6
chore: Update tools
twpayne May 5, 2024
5732f14
chore: Build with Go 1.22.3
twpayne May 8, 2024
b7c54d9
chore: Re-enable snapcraft builds
twpayne May 9, 2024
d81e88b
chore: Add test for #3744
twpayne May 1, 2024
9bad962
chore: Update dependencies
twpayne May 12, 2024
1ef05f2
chore: Update GitHub Actions
twpayne May 12, 2024
6ff87d1
chore: Update golangci-lint
twpayne May 12, 2024
4ad03d7
chore: Pin goreleaser version
twpayne May 12, 2024
ac214d0
chore: switch to Go for generate-commit
bradenhilton May 13, 2024
6eadaf3
chore: Run golangci-lint on all OSes
twpayne May 13, 2024
255846e
chore: Remove unused variable
twpayne May 13, 2024
8c162d5
chore: Update golangci-lint
twpayne May 20, 2024
a61ff05
chore: Update GitHub Actions
twpayne May 20, 2024
ad72fa1
chore: Update dependencies
twpayne May 20, 2024
bda1e81
chore: Move off deprecated macos-11 GitHub Action runners
twpayne May 20, 2024
1a16b49
docs: Add link to article
twpayne May 23, 2024
13bdcf2
chore: Add links to tool release pages
twpayne May 25, 2024
703f0de
chore: Update dependencies
twpayne May 25, 2024
a48a459
chore: Exclude COMMIT from whitespace checks
twpayne May 25, 2024
3bf3e9e
chore: Add workaround for golangci-lint bug
twpayne May 25, 2024
39de9bc
chore: Update tools
twpayne May 25, 2024
24a990d
fix: fix error when determining GOARCH in install.ps1
bradenhilton May 25, 2024
8f72b73
chore: run install.ps1 on both powershell and pwsh
bradenhilton May 25, 2024
5cf451a
fix: Respect umask when creating files
twpayne May 27, 2024
6845ab9
chore: Fix permissions of generated file
twpayne May 27, 2024
788f805
fix: Don't panic on unexpected bubbletea messages
twpayne May 30, 2024
5fb9509
chore: Update dependencies
twpayne May 30, 2024
80d7918
chore: Update tools
twpayne May 30, 2024
bcd52b9
docs: Update comparison-table.md
docwhat May 31, 2024
9c4e461
chore(deps): bump the actions group with 2 updates
dependabot[bot] Jun 1, 2024
ac26c62
chore(deps): bump the python group in /assets with 2 updates
dependabot[bot] Jun 1, 2024
5a31a1c
chore: Build with Go 1.22.4
twpayne Jun 4, 2024
588a157
chore: Update to goreleaser v2
twpayne Jun 5, 2024
f781976
fix: Fix panic when parsing some commands
twpayne Jun 6, 2024
ca643ce
feat: Rename remove command to destroy
twpayne Jun 9, 2024
0f45cb4
feat: Add stub for removed remove command
twpayne Jun 9, 2024
10a0669
chore: Ignore whitespace errors in Python virtualenvs
twpayne Jun 9, 2024
8c3d928
chore: Fix path to install goreleaser v2
twpayne Jun 9, 2024
82caee1
chore: Update dependencies
twpayne Jun 9, 2024
e776519
chore: Update Github Actions
twpayne Jun 9, 2024
5d44441
chore: Update tools
twpayne Jun 9, 2024
2e05737
chore: Temporarily disable install.sh on Windows 2022
twpayne Jun 10, 2024
b8efee1
chore: Bump goreleaser version
twpayne Jun 11, 2024
9618e20
chore: Update dependencies
twpayne Jun 11, 2024
75e4680
chore: lint: don't assume upstream is origin (e.g. after $(gh repo fo…
donaldguy Jun 11, 2024
e102de5
chore: add test to ensure config struct tags match across marshal for…
donaldguy Jun 11, 2024
829c629
chore: Update dependencies
twpayne Jun 16, 2024
476bff9
chore: Update Github Actions
twpayne Jun 16, 2024
e350e50
chore: Update tools
twpayne Jun 16, 2024
af65574
fix: Accept line-endings template directive as well as line-ending
twpayne Jun 17, 2024
d875618
chore: Update dependencies
twpayne Jun 23, 2024
b4b5565
chore: Update Github Actions
twpayne Jun 23, 2024
31b2060
feat: Embed fallback X.509 trusted roots
twpayne Jun 26, 2024
217cdaa
feat: Add --no-network flag to doctor command
twpayne Jun 25, 2024
b7cf4ba
docs: Add GianniBYoung/chezmoi-telescope.nvim to related software
twpayne Jun 30, 2024
473ed67
chore(deps): bump github/codeql-action in the actions group
dependabot[bot] Jul 1, 2024
784bb58
chore(deps): bump the python group in /assets with 2 updates
dependabot[bot] Jul 1, 2024
6c0c12d
chore: Update dependencies
twpayne Jul 1, 2024
4241393
feat: Allow private_ and readonly_ attrs to be set for externals
twpayne Jul 1, 2024
2808e7c
feat: Add tempDir configuration variable
twpayne Jul 1, 2024
2a75540
fix: Prevent chezmoi add from adding chezmoi's own executable
twpayne Jul 1, 2024
3ad9743
chore: Build with Go 1.22.5
twpayne Jul 2, 2024
676a9a9
feat: Add decompression of file externals
twpayne Jul 3, 2024
711534a
docs: Add link to article
twpayne Jul 5, 2024
cf9a38d
chore: Avoid using append in loops
twpayne Jul 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Allow private_ and readonly_ attrs to be set for externals
  • Loading branch information
twpayne committed Jul 1, 2024
commit 42413936a55233df343d65384c49fd6965591bf1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Entries may have the following fields:
| `exact` | bool | `false` | Add `exact_` attribute to directories in archive |
| `exclude` | []string | *none* | Patterns to exclude from archive |
| `executable` | bool | `false` | Add `executable_` attribute to file |
| `private` | bool | `false` | Add `private_` attribute to file |
| `readonly` | bool | `false` | Add `readonly_` attribute to file |
| `format` | string | *autodetect* | Format of archive |
| `path` | string | *none* | Path to file in archive |
| `include` | []string | *none* | Patterns to include from archive |
Expand Down
8 changes: 6 additions & 2 deletions internal/chezmoi/sourcestate.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ type External struct {
Encrypted bool `json:"encrypted" toml:"encrypted" yaml:"encrypted"`
Exact bool `json:"exact" toml:"exact" yaml:"exact"`
Executable bool `json:"executable" toml:"executable" yaml:"executable"`
Private bool `json:"private" toml:"private" yaml:"private"`
ReadOnly bool `json:"readonly" toml:"readonly" yaml:"readonly"`
Checksum externalChecksum `json:"checksum" toml:"checksum" yaml:"checksum"`
Clone externalClone `json:"clone" toml:"clone" yaml:"clone"`
Exclude []string `json:"exclude" toml:"exclude" yaml:"exclude"`
Expand Down Expand Up @@ -2489,8 +2491,8 @@ func (s *SourceState) readExternalArchiveFile(
Type: SourceFileTypeFile,
Empty: fileInfo.Size() == 0,
Executable: IsExecutable(fileInfo) || external.Executable,
Private: isPrivate(fileInfo),
ReadOnly: isReadOnly(fileInfo),
Private: isPrivate(fileInfo) || external.Private,
ReadOnly: isReadOnly(fileInfo) || external.ReadOnly,
}
sourceRelPath := parentSourceRelPath.Join(NewSourceRelPath(fileAttr.SourceName(s.encryption.EncryptedSuffix())))
targetStateEntry := &TargetStateFile{
Expand Down Expand Up @@ -2652,6 +2654,8 @@ func (s *SourceState) readExternalFile(
fileAttr := FileAttr{
Empty: true,
Executable: external.Executable,
Private: external.Private,
ReadOnly: external.ReadOnly,
}
targetStateEntry := &TargetStateFile{
lazyContents: lazyContents,
Expand Down
12 changes: 12 additions & 0 deletions internal/cmd/testdata/scripts/external.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@ cmp $HOME/.file golden/dir/file
[darwin] exec chezmoi managed --include=externals
[darwin] cmp stdout golden/managed-appledouble

chhome home16/user

# test that readonly and private attributes are set
[!windows] exec chezmoi apply
[!windows] cmpmod 400 $HOME/.file

-- archive/dir/file --
# contents of dir/file
-- golden/.file --
Expand Down Expand Up @@ -193,6 +199,12 @@ cmp $HOME/.file golden/dir/file
archive:
extractAppleDoubleFiles: true
stripComponents: 1
-- home16/user/.local/share/chezmoi/.chezmoiexternal.toml --
[".file"]
type = "file"
url = "{{ env "HTTPD_URL" }}/.file"
private = true
readonly = true
-- home2/user/.local/share/chezmoi/.chezmoiexternal.toml --
[".file"]
type = "file"
Expand Down