Closed ZxcSoft closed 6 months ago
PS > scoop search office-tool-plus Results from local buckets...
Name Version Source Binaries
office-tool-plus 10.10.7.0 extras
@niheaven "https://github.com/ScoopInstaller/Scoop/commit/77b66cc8905e1872f550ff833d4d531a9f2a527c"
I don't know what this powershell code is doing, but it's clear to me that this is the problem
I temporarily solved the problem using the following steps(roll back some code):
Delete the following code
# escape N consecutive backslash(es), which are followed by a double quote or at the end of the string, to 2N consecutive ones
$s = $_ -replace '(\\+)(""|$)', '$1$1$2'
# quote the path if it contains spaces and is not NSIS's '/D' argument
# ref: https://nsis.sourceforge.io/Docs/Chapter3.html
if ($s -match ' ' -and $s -notmatch '/D=[A-Z]:[\\/].*') {
$s -replace '([A-Z]:[\\/].*)', '"$1"'
} else {
$s
}
Then add the following code
# escape N consecutive backslash(es), which are followed by a double quote, to 2N consecutive ones
$s = $_ -replace '(\\+)"', '$1$1"'
# escape N consecutive backslash(es), which are at the end of the string, to 2N consecutive ones
$s = $s -replace '(\\+)$', '$1$1'
# escape double quotes
$s = $s -replace '"', '\"'
# quote the argument
"`"$s`""
Install "office-tool-plus" again
Or use Git-Bash to roll back to the scoop version before 77b66cc was submitted. For example 9770c86:
git reset --hard 9770c86 # roll back to 9770c86
scoop install office-tool-plus # install otp again
Prerequisites
Package Name
office-tool-plus
Expected/Current Behaviour
install office-tool-plus failed
Steps to Reproduce
Possible Solution
no
Scoop and Buckets Version
Scoop Config
PowerShell Version
Additional Softwares
none