scoop-nerd-fonts icon indicating copy to clipboard operation
scoop-nerd-fonts copied to clipboard

Errors while installing SarasaGothic font

Open FDUZS opened this issue 4 years ago • 10 comments

Zheng :: ~ » scoop install SarasaGothic
Installing 'SarasaGothic' (0.14.5) [64bit]
Loading sarasa-gothic-ttf-0.14.5.7z from cache
Checking hash of sarasa-gothic-ttf-0.14.5.7z ... ok.
Extracting sarasa-gothic-ttf-0.14.5.7z ... done.
Running installer script...
Copy-Item : The requested operation cannot be performed on a file with a user-mapped section open.
At line:3 char:3
+   Copy-Item $_.FullName -destination "$env:windir\Fonts"
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Copy-Item], IOException
    + FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.CopyItemCommand

......

Linking D:\Scoop\apps\SarasaGothic\current => D:\Scoop\apps\SarasaGothic\0.14.5
'SarasaGothic' (0.14.5) was installed successfully!

There seem to be a lot of errors when I install SarasaGothic via Scoop and I have no idea what's wrong. What surprises me most is that it should prompt 'SarasaGothic' (0.14.5) was installed successfully? Full error messages: https://gist.github.com/FDUZS/eff500d45000c42619d18be61bf13b69#file-errors-while-installing-sarasagothic-font

FDUZS avatar Dec 02 '20 08:12 FDUZS

fonts installed via Scoop include: Cascadia-Code, JetBrains-Mono, Source-Han-Noto-CJK-Ultra-OTC

FDUZS avatar Dec 02 '20 08:12 FDUZS

I have a similar problem. However, I think the message of the successfully install is scoop's problem that error handling in scoop is quite limited.

qcts33 avatar Dec 05 '20 02:12 qcts33

I have a similar problem. However, I think the message of the successfully install is scoop's problem that error handling in scoop is quite limited.

agreed.

FDUZS avatar Dec 05 '20 08:12 FDUZS

The 'user-mapped section' error can't be prevented from the manifest side as far as I understand, and I've only been able to prevent that error by restarting the computer oddly enough...

matthewjberger avatar Dec 05 '20 17:12 matthewjberger

The 'user-mapped section' error can't be prevented from the manifest side as far as I understand, and I've only been able to prevent that error by restarting the computer oddly enough...

I'm guessing that the error is related to some font caching mechanisms in windows system. If it is true, it's going to be very difficult to prevent it entirely.

qcts33 avatar Dec 06 '20 01:12 qcts33

fonts installed via Scoop include: Cascadia-Code, JetBrains-Mono, Source-Han-Noto-CJK-Ultra-OTC

Compared to other fonts installation, say JetBrains-Mono, which has no such errors. While Sarasa Gothic is a CJK programming font based on Iosevka and Source Han Sans, maybe there are some kind of conflicts with the Source-Han-Noto-CJK-Ultra-OTC font? It's not been tested yet.

FDUZS avatar Dec 06 '20 05:12 FDUZS

I don't think there is a correlation between the font and the error, as I've seen it happen before with a variety of other fonts

It seems like it's an environmental issue with certain running processes locking the files or directories that are needed

matthewjberger avatar Dec 06 '20 08:12 matthewjberger

I got "error exit code was 2"

mephisX avatar Aug 16 '22 15:08 mephisX

I have the same issue:

> scoop install SarasaGothic-SC
Installing 'SarasaGothic-SC' (0.36.8) [64bit] from nerd-fonts bucket
Loading sarasa-gothic-ttf-0.36.8.7z from cache
Checking hash of sarasa-gothic-ttf-0.36.8.7z ... ok.
Running pre_install script...
ERROR Exit code was 2!
> scoop update -f SarasaGothic-SC
SarasaGothic-SC: 0.36.8 -> 0.36.8
Updating one outdated app:
Updating 'SarasaGothic-SC' (0.36.8 -> 0.36.8)
Downloading new version
Loading sarasa-gothic-ttf-0.36.8.7z from cache
Checking hash of sarasa-gothic-ttf-0.36.8.7z ... ok.
Uninstalling 'SarasaGothic-SC' (0.36.8)
Running uninstaller script...
The 'Sarasa-Gothic' Font family has been uninstalled and will not be present after restarting your computer.
Unlinking ~\scoop\apps\SarasaGothic-SC\current
Installing 'SarasaGothic-SC' (0.36.8) [64bit] from nerd-fonts bucket
Loading sarasa-gothic-ttf-0.36.8.7z from cache
Running pre_install script...
ERROR Exit code was 2!
Running installer script...
Linking ~\scoop\apps\SarasaGothic-SC\current => ~\scoop\apps\SarasaGothic-SC\0.36.8
'SarasaGothic-SC' (0.36.8) was installed successfully!

zeroxia avatar Aug 24 '22 05:08 zeroxia

The problem described by @mephisX and @zeroxia is caused by a change in Scoop core (https://github.com/ScoopInstaller/Scoop/pull/5065) which breaks compatibility. It should be fixed now.

issaclin32 avatar Aug 24 '22 09:08 issaclin32