matthewjberger / scoop-nerd-fonts

A scoop bucket for installing nerd fonts
The Unlicense
360 stars 34 forks source link

Install any font from this bucket will raise IOException. Is that OK? #88

Closed tan-wei closed 3 years ago

tan-wei commented 3 years ago

For example:

>_ sudo scoop install Delugia-Nerd-Font-Book --global
Installing 'Delugia-Nerd-Font-Book' (2007.01) [64bit]
Loading Delugia.Nerd.Font.Book.ttf from cache
Checking hash of Delugia.Nerd.Font.Book.ttf ... ok.
Running installer script...
Copy-Item : 请求的操作无法在使用用户映射区域打开的文件上执行。
所在位置 行:4 字符: 5
+     Copy-Item $_.FullName -destination "$env:windir\Fonts"
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Copy-Item], IOException
    + FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.CopyItemCommand

Linking C:\ProgramData\scoop\apps\Delugia-Nerd-Font-Book\current => C:\ProgramData\scoop\apps\Delugia-Nerd-Font-Book\2007.01
'Delugia-Nerd-Font-Book' (2007.01) was installed successfully!
matthewjberger commented 3 years ago

Try:

sudo scoop uninstall Delugia-Nerd-Font-Book --global
scoop cache rm *

then restart your computer and run it again

sudo scoop install Delugia-Nerd-Font-Book --global

I can verify the installation works properly under normal circumstances but that should help fix possible issues with your environment

tan-wei commented 3 years ago

Ok, I confirm that after I do what you say, it doesn't complain IOException any more. Thanks very much. But why it occurs?

SharakPL commented 2 years ago

It will always complain if the font is in use, especially by the terminal you're runnig scoop commands in. @matthewjberger Isn't there a better way for installing fonts to avoid such errors? Clearly the font is installed anyway. It's just complaining it can't be reloaded by the system, because it's in use. Installing the font manually through double click doesn't generate any errors so there has to be a better way...