Comments (4)
bin/starship
and bin/fastfetch
are missing
executable = true
in your .chezmoiexternal.toml
file.
Wait, that's not correct.
from chezmoi.
❯ docker run -it alpine:latest
/ # apk update
...
OK: 22982 distinct packages available
/ # apk add curl
...
OK: 12 MiB in 23 packages
/ # apk add neovim
...
OK: 34 MiB in 34 packages
/ # sh -c "$(curl -fsLS get.chezmoi.io)"
info found version 2.46.1 for latest/linux/amd64
info installed ./bin/chezmoi
/ # chezmoi init
/ # cd $(chezmoi source-path)
~/.local/share/chezmoi # nvim .chezmoiexternal.toml
~/.local/share/chezmoi # cat .chezmoiexternal.toml
{{- if eq .chezmoi.os "linux" }}
["bin/starship"]
type = "archive-file"
url = "https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz"
path = "starship"
["bin/fastfetch"]
type = "archive-file"
url = "https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-x86_64.zip"
path = "fastfetch-linux-x86_64/usr/bin/fastfetch"
{{- end }}
~/.local/share/chezmoi # nvim .chezmoiignore
~/.local/share/chezmoi # cat .chezmoiignore
README.md
{{- if ne .chezmoi.os "linux" }}
bin/fastfetch
bin/starship
{{- end }}
~/.local/share/chezmoi # chezmoi apply
~/.local/share/chezmoi # cd
~ # chezmoi add ./bin
~ # chezmoi managed
chezmoi: bin/fastfetch: inconsistent state (/root/.local/share/chezmoi/bin/executable_fastfetch, https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-x86_64.zip defined in /root/.local/share/chezmoi/.chezmoiexternal.toml)
bin/starship: inconsistent state (/root/.local/share/chezmoi/bin/executable_starship, https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz defined in /root/.local/share/chezmoi/.chezmoiexternal.toml)
from chezmoi.
~ # chezmoi add ./bin ~ # chezmoi managed chezmoi: bin/fastfetch: inconsistent state (/root/.local/share/chezmoi/bin/executable_fastfetch, https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-x86_64.zip defined in /root/.local/share/chezmoi/.chezmoiexternal.toml) bin/starship: inconsistent state (/root/.local/share/chezmoi/bin/executable_starship, https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz defined in /root/.local/share/chezmoi/.chezmoiexternal.toml)
Yes, I reproduced it with alpine as well:
~/.local/share/chezmoi # git status
On branch master
nothing to commit, working tree clean
~/.local/share/chezmoi # tree .
.
└── bin
├── bar
└── foo
1 directories, 2 files
~/.local/share/chezmoi # cat .chezmoiexternal.toml .chezmoiignore
{{- if eq .chezmoi.os "linux" }}
["bin/starship"]
type = "archive-file"
url = "https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz"
path = "starship"
["bin/fastfetch"]
type = "archive-file"
url = "https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-x86_64.zip"
path = "fastfetch-linux-x86_64/usr/bin/fastfetch"
{{- end }}
README.md
{{- if ne .chezmoi.os "linux" }}
bin/fastfetch
bin/starship
{{- end }}
~/.local/share/chezmoi # tree ~/bin/
/root/bin/
├── bar
├── fastfetch
├── foo
└── starship
0 directories, 4 files
~/.local/share/chezmoi # chezmoi add ~/bin/
~/.local/share/chezmoi # chezmoi managed
chezmoi: bin/fastfetch: inconsistent state (/root/.local/share/chezmoi/bin/executable_fastfetch, https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-x86_64.zip defined in /root/.local/share/chezmoi/.chezmoiexternal.toml)
bin/starship: inconsistent state (/root/.local/share/chezmoi/bin/executable_starship, https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz defined in /root/.local/share/chezmoi/.chezmoiexternal.toml)
~/.local/share/chezmoi # git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
bin/executable_fastfetch
bin/executable_starship
nothing added to commit but untracked files present (use "git add" to track)
from chezmoi.
Under the hood, this is the same issue as #1574.
Note that bin/starship
and bin/fastfetch
are not ignored. They're only ignored on non-Linux machines.
What's happening here is that two files which are already defined in .chezmoiexternal.toml
are also being added with chezmoi add
, and the resulting state is inconsistent.
chezmoi should not allow files to be added if they're already defined as externals. I'll update the description of #1574.
from chezmoi.
Related Issues (20)
- GitHub Actions tests on macOS occasionally fail due to unexpected output from KeePassXC in open mode
- Provide `.chezmoi.script` context for templated scripts
- A way to set command aliases HOT 1
- get.chezmoi.io still returns old install script HOT 1
- chezmoi is not respecting my .chezmoiignore HOT 4
- git-commit-message don't understand copies detected by git
- Comments containing {{ and }} break .chezmoiignore on Windows HOT 2
- How to manage chezmoi config file with chezmoi itself? HOT 1
- Improve automatic dependency updates HOT 1
- Unable to add `~/.config/chezmoi/chezmoi.toml` to chezmoi HOT 12
- Adding local changes to target which is templated HOT 3
- Cannot auto commit/push scripts HOT 11
- promptChoice but allow for selecting multiple choices HOT 2
- `chezmoi cd` and `chezmoi doctor` doesn't honour `chezmoi init --source /path` when initialising HOT 9
- *.plist files broke chezmostatus and diff HOT 4
- Chezmoi "add" cannot add anything in parent of external HOT 1
- .chezmoi.hostname has sometimes a bad value on linux HOT 7
- Template function `keys` for dicts does not produce correct type for `promptChoice*` functions.
- chezmoi: open C:/.../desktop.ini: Access is denied. HOT 5
- `chezmoi diff` panics with `tea.unknownCSISequenceMsg: unknown message type` HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezmoi.