From 7b5e4e12d2102e843e9644eb16701ae6819c9157 Mon Sep 17 00:00:00 2001 From: Andrejus Date: Tue, 23 Dec 2025 21:44:10 +0200 Subject: [PATCH] fix: brew env --- script/install | 26 ++++++++++++++++++-------- script/install.d/02-brew.sh | 9 --------- script/install.d/12-node.sh | 6 ++---- script/install.d/23-copilot.sh | 16 ---------------- 4 files changed, 20 insertions(+), 37 deletions(-) delete mode 100755 script/install.d/23-copilot.sh diff --git a/script/install b/script/install index 07fd568..3967692 100755 --- a/script/install +++ b/script/install @@ -6,14 +6,14 @@ set -eo pipefail # if [[ -t 1 && -n "$TERM" && "$TERM" != "dumb" ]]; then - BLUE="\033[0;34m" - CYAN="\033[0;36m" - CYAN_BOLD="\033[1;36m" - RED="\033[1;31m" - GREEN="\033[1;32m" - YELLOW="\033[1;33m" - GREY="\033[1;30m" - NC="\033[0m" + BLUE=$'\033[38;2;12;72;204m' + CYAN=$'\033[38;2;0;228;252m' + CYAN_BOLD=$'\033[1;38;2;0;228;252m' + RED=$'\033[38;2;244;4;4m' + GREEN=$'\033[38;2;44;180;148m' + YELLOW=$'\033[38;2;252;252;56m' + GREY=$'\033[38;2;128;128;128m' + NC=$'\033[0m' else BLUE="" CYAN="" @@ -78,6 +78,16 @@ case "$OSTYPE" in ;; esac +# Set up Homebrew environment +if [[ "$DOTS_PKG" == "brew" ]]; then + NONINTERACTIVE=1 + HOMEBREW_NO_ANALYTICS=1 + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 + HOMEBREW_NO_ENV_HINTS=1 + HOMEBREW_NO_AUTO_UPDATE=1 + HOMEBREW_NO_INSTALL_CLEANUP=1 +fi + # Set up directory variables if [ -L "$0" ]; then dir=$(dirname $(readlink -f "$0")) diff --git a/script/install.d/02-brew.sh b/script/install.d/02-brew.sh index ae5b6ce..453e172 100644 --- a/script/install.d/02-brew.sh +++ b/script/install.d/02-brew.sh @@ -8,15 +8,6 @@ # macOS only [[ "$DOTS_OS" != "macos" ]] && { log_warn "Skipping: Not macOS"; return 0; } -if [ -d "/opt/homebrew/bin" ]; then - export PATH="/opt/homebrew/bin:$PATH" -fi -export NONINTERACTIVE=1 -export HOMEBREW_NO_ANALYTICS=1 -export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 -export HOMEBREW_NO_ENV_HINTS=1 -export HOMEBREW_NO_AUTO_UPDATE=1 -export HOMEBREW_NO_INSTALL_CLEANUP=1 if ! command -v brew &> /dev/null; then echo "Installing Homebrew..." bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" diff --git a/script/install.d/12-node.sh b/script/install.d/12-node.sh index 296bbb7..79c5431 100644 --- a/script/install.d/12-node.sh +++ b/script/install.d/12-node.sh @@ -25,12 +25,10 @@ echo "npm $(npm --version)" npm_dependencies=( "firebase-tools" - # "neovim" - # "typescript-language-server" - # "typescript" + "@github/copilot" ) -npm_dependencies=($(comm -13 <(printf "%s\n" "${npm_dependencies[@]}" | sort) <(npm list -g --depth=0 --parseable | awk -F'/' '{print $NF}' | sort))) +npm_dependencies=($(comm -23 <(printf "%s\n" "${npm_dependencies[@]}" | sort) <(npm list -g --depth=0 --parseable | awk -F'/' '{print $NF}' | sort))) if [ ${#npm_dependencies[@]} -gt 0 ]; then npm install -g "${npm_dependencies[@]}" diff --git a/script/install.d/23-copilot.sh b/script/install.d/23-copilot.sh deleted file mode 100755 index c68d31d..0000000 --- a/script/install.d/23-copilot.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# ----------------------------------------------------------------------------- -# Description: -# Install GitHub Copilot CLI. -# - -if ! command -v copilot &>/dev/null; then - if command -v npm &>/dev/null; then - npm install -g @github/copilot - else - log_warn "Skipping GitHub Copilot CLI install: npm not found" - fi -fi - -copilot --version