From a4557464bee754e2b47d5943c5fb940bdab507ed Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 22 Aug 2023 11:23:34 +0800 Subject: [PATCH] Fix font download error. Downloading MesloLGS NF Regular.ttf ... ERROR Command: curl -fsSL -o /Users/weiwei/Library/Fonts/MesloLGS\ NF\ Regular.ttf.tmp https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443 --- internal/wizard.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/wizard.zsh b/internal/wizard.zsh index c7a03844..2ae8d41b 100644 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -518,6 +518,13 @@ function install_font() { local style for style in Regular Bold Italic 'Bold Italic'; do local file="MesloLGS NF ${style}.ttf" + + print "$file ==Ready to download==" + if [[ -f ~"/Library/Fonts/$file" ]]; then + print "$file ==Already exist==" + continue + fi + run_command "Downloading %B$file%b" \ curl -fsSL -o ~/Library/Fonts/$file.tmp "$font_base_url/${file// /%20}" command mv -f -- ~/Library/Fonts/$file{.tmp,} || quit -c