Skip to content

Commit

Permalink
fixed a bug that broke bootstrapping if a default profile was not alr…
Browse files Browse the repository at this point in the history
…eady set
  • Loading branch information
maker2413 committed Oct 3, 2024
1 parent d9df133 commit b7df8a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.org
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

** [Unreleased]

** [0.2.1] - 2024-10-3

*** Fixed
- A bug where bootstrapping was broken if a default profile was not already
set.

** [0.2.0] - 2024-10-2

*** Added
Expand Down
10 changes: 8 additions & 2 deletions yacm
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,15 @@ function bootstrap() {
local subcommand=$1;
if [[ -z $subcommand ]]; then
echo "Checking current default profile...";
if [[ -f $YACM_PROFILES_DIR/$default_profile.yml ]]; then
if [[ -f $YACM_DIR/default_profile ]]; then
default_profile="$(cat "$YACM_DIR"/default_profile 2>/dev/null)";
bootstrap_prompt "$default_profile";
if [[ -f $YACM_PROFILES_DIR/$default_profile.yml ]]; then
bootstrap_prompt "$default_profile";
else
echo -e "\n\e[31mSpecified default profile, \e[32m$default_profile\e[31m, doesn't exist!.\e[0m";
echo -e "Please run: \e[32myacm profile default\e[0m to set default for this system or";
echo -e "run: \e[32myacm bootstrap profile [profile_name]\e[0m to specify which profile to use.";
fi
else
echo -e "\n\e[31mNo default profile currently set!.\e[0m";
echo -e "Please run: \e[32myacm profile default\e[0m to set default for this system or";
Expand Down

0 comments on commit b7df8a8

Please sign in to comment.