chezmoi: exec format error after creating `run_once_install-packages.sh`

What exactly are you trying to do?

I created a run_once_install-packages.sh file by renaming an existing file using:

`mv one_time_setup.sh run_once_install-packages.sh

(I made some modifications to a manual setup file I already had to make it compatible with chezmoi.)

What have you tried so far?

Here are the results of running the normal set of commands to apply a change.

chezmoi status

R install-packages.sh

chezmoi apply -nv

chezmoi: fork/exec /var/folders/tf/t3s0xffn49z7jmhzj82dn6q00000gn/T/1436228616.install-packages.sh: exec format error

Where else have you checked for solutions?

Output of any commands you’ve tried with --verbose flag

$ chezmoi --verbose $COMMAND

diff --git a/install-packages.sh b/install-packages.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391…ea52a1da1af9663822f38a3708eb318c7d0867be 100755 — a/install-packages.sh +++ b/install-packages.sh @@ -0,0 +1,13 @@ +# THIS SCRIPT IS RUN ONCE BY CHEZMOI TO SET UP. + +{{ if eq .chezmoi.os “darwin” -}} +#!/usr/bin/zsh +# Install Chezmoi (Dotfile manager.) +brew install chezmoi + +# Antigen (Package manager for zsh) +brew install antigen + +# Install Vundle (package manager for Vim). +git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim +{{ end -}} chezmoi: fork/exec /var/folders/tf/t3s0xffn49z7jmhzj82dn6q00000gn/T/537353732.install-packages.sh: exec format error

Output of chezmoi doctor

$ chezmoi doctor

RESULT CHECK MESSAGE ok version v2.17.1, commit 565cbbe117746aa6bfec5f2cee20ae4cbbb5e645, built at 2022-05-30T08:06:04Z, built by Homebrew ok latest-version v2.17.1 ok os-arch darwin/amd64 ok uname Darwin noahs-mac-pro.lan 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64 ok go-version go1.18.2 (gc) ok executable /usr/local/bin/chezmoi ok upgrade-method replace-executable ok config-file ~/.config/chezmoi/chezmoi.toml ok source-dir ~/.local/share/chezmoi is a directory ok suspicious-entries no suspicious entries ok working-tree ~/.local/share/chezmoi is a directory ok dest-dir ~ is a directory ok shell-command found /bin/zsh ok shell-args /bin/zsh ok cd-command found /bin/zsh ok cd-args /bin/zsh ok edit-command found /usr/bin/vim ok edit-args vim info diff-command not set ok umask 022 ok git-command found /usr/bin/git, version 2.30.1 ok merge-command found /usr/bin/vimdiff info age-command age not found in $PATH info gpg-command gpg not found in $PATH info pinentry-command not set info 1password-command op not found in $PATH info bitwarden-command bw not found in $PATH info gopass-command gopass not found in $PATH info keepassxc-command keepassxc-cli not found in $PATH info keeper-command keeper not found in $PATH info keepassxc-db not set info lastpass-command lpass not found in $PATH info pass-command pass not found in $PATH info vault-command vault not found in $PATH info secret-command not set

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Thanks @bradenhilton @twpayne ! Everything works now.