Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure default branch name for dotfiles repository #242

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion installer
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ DOTFILES_PATH="${DOTFILES_PATH:-$HOME/.dotfiles}"
DOTFILES_PATH="$(eval echo "$DOTFILES_PATH")"
export DOTFILES_PATH="$DOTFILES_PATH"

DOTFILES_BRANCH=${DOTFILES_BRANCH:-main}

dotly_inner_path="modules/dotly"
export DOTLY_PATH="$DOTFILES_PATH/$dotly_inner_path"

Expand Down Expand Up @@ -140,7 +142,7 @@ if ! command_exists curl; then
fi

_a "Initializing your dotfiles git repository"
git init 2>&1 | _log "Initializing repository"
git init --initial-branch="$DOTFILES_BRANCH" 2>&1 | _log "Initializing repository"

_a "Cloning dotly"
git submodule add -b "$DOTLY_BRANCH" "https://github.com/$DOTLY_REPOSITORY.git" "$dotly_inner_path" 2>&1 | _log "Adding dotly submodule"
Expand Down