matthewjberger / scoop-nerd-fonts

A scoop bucket for installing nerd fonts
The Unlicense
369 stars 35 forks source link

Errors while installing SarasaGothic font #95

Open FDUZS opened 3 years ago

FDUZS commented 3 years ago
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 commented 3 years ago

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

qcts33 commented 3 years ago

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.

FDUZS commented 3 years ago

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.

matthewjberger commented 3 years ago

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...

qcts33 commented 3 years ago

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.

FDUZS commented 3 years ago

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.

matthewjberger commented 3 years ago

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

mephisX commented 2 years ago

I got "error exit code was 2"

zeroxia commented 2 years ago

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!
issaclin32 commented 2 years ago

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.