From 1464356289dd6aa2bbdcb1944d9c42a3de82aa2d Mon Sep 17 00:00:00 2001 From: Marley Rae Date: Sat, 3 Feb 2024 20:03:19 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20all=20install=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fish/install.fish | 2 +- homebrew/brew_utils.fish | 2 +- node/node_utils.fish | 10 +++++++--- os/macos/language_and_region.pref.fish | 2 +- os/macos/networking.pref.fish | 2 +- tmux/install.fish | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/fish/install.fish b/fish/install.fish index c3ffcbf..702ceec 100755 --- a/fish/install.fish +++ b/fish/install.fish @@ -15,4 +15,4 @@ brew_install "FiraCode Nerd Font" font-fira-code-nerd-font "" homebrew/cask-font brew_install "Starship Prompt" starship brew_install "The Fuck" thefuck npm_install "tldr pages" tldr -brew_install exa exa +brew_install eza eza diff --git a/homebrew/brew_utils.fish b/homebrew/brew_utils.fish index 73bb09f..e8cfd4c 100644 --- a/homebrew/brew_utils.fish +++ b/homebrew/brew_utils.fish @@ -45,7 +45,7 @@ function brew_install -a formula_readable_name formula arguments tap_value servi end # Determine if a service needs to be started & restarted on login. - if set -q service + if set -q service && [ "$service" = true ] set -f service_cmd "&& brew services start $formula" end diff --git a/node/node_utils.fish b/node/node_utils.fish index 9f714d5..4a0831c 100644 --- a/node/node_utils.fish +++ b/node/node_utils.fish @@ -5,7 +5,11 @@ source "$DOT/script/utils.fish" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - function npm_install -a msg pkg - execute \ - "source $DOT/node/path.config.fish && npm install --global --silent $pkg" \ - "$msg" + set -f cmd "npm install --global --silent $pkg" + + if ! cmd_exists volta + set cmd "source $DOT/node/path.config.fish; $cmd" + end + + execute "$cmd" "$msg" end diff --git a/os/macos/language_and_region.pref.fish b/os/macos/language_and_region.pref.fish index 167694e..1bf2d48 100755 --- a/os/macos/language_and_region.pref.fish +++ b/os/macos/language_and_region.pref.fish @@ -9,5 +9,5 @@ print_subtitle "Language & Region" execute "defaults write -g AppleLanguages -array 'en'" \ "Set language" -execute "defaults write -g AppleICUDateFormatStrings -dict '{2 = 'd MMM y'; 3 = 'd MMMM y'; 4 = 'EEEE, d MMMM y'}'" \ +execute "defaults write -g AppleICUDateFormatStrings -dict 2 'd MMM y' 3 'd MMMM y' 4 'EEEE, d MMMM y'" \ "Set date formats" diff --git a/os/macos/networking.pref.fish b/os/macos/networking.pref.fish index f22dd0c..91ac0ff 100755 --- a/os/macos/networking.pref.fish +++ b/os/macos/networking.pref.fish @@ -6,5 +6,5 @@ source "$DOT/script/utils.fish" print_subtitle Networking -execute "defaults write -g com.apple.NetworkBrowser BrowseAllInterfaces 1" \ +execute "defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true" \ "Allow AirDrop over Ethernet" diff --git a/tmux/install.fish b/tmux/install.fish index 9f2e0b5..1bfcaa2 100755 --- a/tmux/install.fish +++ b/tmux/install.fish @@ -7,4 +7,4 @@ source "$DOT/homebrew/brew_utils.fish" print_subtitle tmux -brew_install tmux +brew_install tmux tmux