fix: properly handle custom branch in chezmoi module (#368)
For posterity: `INIT_BRANCH_FLAG` should be set if `DOTFILE_BRANCH` is not empty and is not equal to `"null"`.
This commit is contained in:
parent
387a29e127
commit
c065b145de
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ fi
|
|||
DOTFILE_REPOSITORY=$(echo "$1" | yq -I=0 ".repository") # (string)
|
||||
# The chezmoi repository branch to use.
|
||||
DOTFILE_BRANCH=$(echo "$1" | yq -I=0 ".branch")
|
||||
if ! [[ -z "${DOTFILE_BRANCH}" ]] || [[ "${DOTFILE_BRANCH}" == "null" ]]; then
|
||||
if [[ -n "${DOTFILE_BRANCH}" && "${DOTFILE_BRANCH}" != "null" ]]; then
|
||||
INIT_BRANCH_FLAG="--branch ${DOTFILE_BRANCH}"
|
||||
else
|
||||
INIT_BRANCH_FLAG=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue