You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is a odd, but I can't directly do string operations on .chezmoi.config.destDir. While it looks like a string, it is not allowed in string functions.
I currently use cat .chezmoi.config.destDir as a workaround
$ chezmoi --verbose execute-template '{{ .chezmoi.config.destDir | replace "abc" "def" }}'chezmoi: template: arg1:1:43: executing "arg1" at <"def">: wrong type for value; expected string; got chezmoi.AbsPath
Output of chezmoi doctor
$ chezmoi doctorRESULT CHECK MESSAGEok version v2.47.0, commit 39bd915f446068862cc3064edb6dbeee795785ca, built at 2024-02-25T20:56:37Z, built by goreleaserfailed latest-version Get "https://api.github.com/repos/twpayne/chezmoi/releases/latest": dial tcp: lookup api.github.com on [::1]:53: read udp [::1]:58604->[::1]:53: read: connection refusedok os-arch android/arm64ok uname Linux localhost 4.19.191+ #1 SMP PREEMPT Wed Nov 29 21:44:22 CST 2023 aarch64 Androidok go-version go1.22.0 (gc)ok executable ~/.local/bin/chezmoiok upgrade-method replace-executableok config-file ~/.config/chezmoi/chezmoi.yaml, last modified 2024-02-27T05:30:09Zok source-dir ~/.local/share/chezmoi/home is a directoryok suspicious-entries no suspicious entrieswarning working-tree ~/.local/share/chezmoi is a git working tree (dirty)ok dest-dir ~ is a directorywarning umask 077ok cd-command found /data/data/com.termux/files/usr/bin/zshok cd-args /data/data/com.termux/files/usr/bin/zshinfo diff-command not setok edit-command found /data/data/com.termux/files/usr/bin/microok edit-args microok git-command found /data/data/com.termux/files/usr/bin/git, version 2.44.0warning merge-command vimdiff not found in $PATHok shell-command found /data/data/com.termux/files/usr/bin/zshok shell-args /data/data/com.termux/files/usr/bin/zshinfo age-command age not found in $PATHok gpg-command found /data/data/com.termux/files/usr/bin/gpg, version 2.4.4info pinentry-command not setinfo 1password-command op not found in $PATHinfo bitwarden-command bw not found in $PATHinfo bitwarden-secrets-command bws not found in $PATHinfo dashlane-command dcli not found in $PATHinfo doppler-command doppler not found in $PATHinfo gopass-command gopass not found in $PATHinfo keepassxc-command keepassxc-cli not found in $PATHinfo keepassxc-db not setinfo keeper-command keeper not found in $PATHinfo lastpass-command lpass not found in $PATHinfo pass-command pass not found in $PATHinfo passhole-command ph not found in $PATHinfo rbw-command rbw not found in $PATHinfo vault-command vault not found in $PATHinfo vlt-command vlt not found in $PATHinfo secret-command not set
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. The underlying problem is that replace is a template function from github.com/masterminds/sprig and pretty much all the functions in masterminds/sprig are inflexible and broken. See #2668 for work on a replacement.
Describe the bug
I think this is a odd, but I can't directly do string operations on
.chezmoi.config.destDir
. While it looks like astring
, it is not allowed in string functions.I currently use
cat .chezmoi.config.destDir
as a workaroundTo reproduce
$ chezmoi execute-template '{{ .chezmoi.config.destDir | replace "abc" "def" }}'
Expected behavior
No error should happen
Output of command with the
--verbose
flagOutput of
chezmoi doctor
The text was updated successfully, but these errors were encountered: