File tree Expand file tree Collapse file tree 1 file changed +23
-10
lines changed Expand file tree Collapse file tree 1 file changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -400,17 +400,30 @@ install_mkcert() {
400400 return 0
401401 fi
402402
403- if ! command -v brew > /dev/null 2>&1 ; then
404- log_error " mkcert not found and Homebrew not available for installation"
405- return 1
406- fi
407-
408- log_info " Installing mkcert with Homebrew..."
409- if brew install mkcert nss && mkcert -install; then
410- log_success " mkcert installed successfully"
411- return 0
403+ # Try different package managers based on availability
404+ if command -v brew > /dev/null 2>&1 ; then
405+ log_info " Installing mkcert with Homebrew..."
406+ if brew install mkcert nss && mkcert -install; then
407+ log_success " mkcert installed successfully"
408+ return 0
409+ else
410+ log_error " Failed to install mkcert with Homebrew"
411+ return 1
412+ fi
413+ elif command -v pacman > /dev/null 2>&1 ; then
414+ log_info " Installing mkcert with pacman..."
415+ if sudo pacman -S --noconfirm nss mkcert && mkcert -install; then
416+ log_success " mkcert installed successfully"
417+ return 0
418+ else
419+ log_error " Failed to install mkcert with pacman"
420+ return 1
421+ fi
412422 else
413- log_error " Failed to install mkcert"
423+ log_error " mkcert not found and no supported package manager available"
424+ log_info " Please install mkcert manually:"
425+ log_info " - Arch Linux: sudo pacman -S nss mkcert"
426+ log_info " - macOS: brew install mkcert nss"
414427 return 1
415428 fi
416429}
You can’t perform that action at this time.
0 commit comments