Closed julian-poidevin closed 1 year ago
The script is failing because the
install-packages.sh
script is bugged on mymain
branch.
Do you have direct evidence that chezmoi is ignoring the --branch
flag, rather than the circumstancial evidence cited?
I tried to reproduce the issue with the following steps:
$ docker pull ubuntu:latest
...
$ docker run -it ubuntu:latest /bin/bash
# apt update && apt install -y curl
...
# sh -c "$(curl -fsLS git.io/chezmoi)" -- init --verbose --branch=hyprland-tokyo --apply julian-poidevin
info found version 2.33.6 for latest/linux/amd64
info installed ./bin/chezmoi
Work email address? work@example.com
Personal email address? user@home.org
...
chezmoi: template: dot_env-secrets.tmpl:8:51: executing "dot_env-secrets.tmpl" at <.bitwarden.github_work_repo_token>: map has no entry for key "bitwarden"
# apt install -y git
...
# chezmoi cd
# git status
On branch hyprland-tokyo
Your branch is up to date with 'origin/hyprland-tokyo'.
nothing to commit, working tree clean
The output of git status
indicates that chezmoi has respected the --branch
argument to chezmoi init
.
Do you have a case which reproduces the problem?
Sorry I can't manage to reproduce on my side either. Thanks for trying reproducing my issue.
Describe the bug
When running the one liner recommended in the docs :
with a
--branch
option, it seem the--branch
option is ignored.To reproduce
pacman -Sy
hyprland-tokyo
branch :sh -c "$(curl -fsLS git.io/chezmoi)" -- init --branch hyprland-tokyo --apply julian-poidevin
chezmoi
seems to be cloning the main branch instead ofhyprland-tokyo
branch because runninggit branch -l
in/root/.local/share/chezmoi
shows "* main
"Expected behavior
The single command
sh -c "$(curl -fsLS git.io/chezmoi)" -- init --branch hyprland-tokyo --apply julian-poidevin
should run theinit
on thehyprland-tokyo
branch.Output of command with the
--verbose
flagThe script is failing because the
install-packages.sh
script is bugged on mymain
branch.I'm not trying to debug my script here but trying to understand why the branch is not the correct one.
Output of
chezmoi doctor
Additional context
N/A