You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are script errors when running installer and uninstaller script. installation and update themselves are working with those problems. Also, it would be better to remove deprecated things in the scripts..
Steps to Reproduce
PS> scoop update sdl2
Uninstalling 'sdl2' (2.30.2)
Running uninstaller script...
WARN "env" will be deprecated. Please change your code/manifest to use "Get-EnvVar"-> :4:38
WARN "strip_path" will be deprecated. Please change your code/manifest to use "Split-PathLikeEnvVar"-> :4:26
InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85
Line |85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.WARN"env"willbedeprecated.Pleasechangeyourcode/manifesttouse"Get-EnvVar"-> :9:38WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :9:26InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :15:26InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :17:26InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.Unlinking ~\scoop\apps\sdl2\currentInstalling'sdl2' (2.30.3) [64bit] from'extras'bucketLoadingSDL2-devel-2.30.3-VC.zipfromcache.LoadingSDL2-2.30.3.zipfromcache.ExtractingSDL2-devel-2.30.3-VC.zip ...done.ExtractingSDL2-2.30.3.zip ...done.Runninginstallerscript...WARN"env"willbedeprecated.Pleasechangeyourcode/manifesttouse"Get-EnvVar"-> :33:32WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :33:20InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.WARN"env"willbedeprecated.Pleasechangeyourcode/manifesttouse"Set-EnvVar"-> :34:1WARN"env"willbedeprecated.Pleasechangeyourcode/manifesttouse"Get-EnvVar"-> :35:32WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :35:20InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.WARN"env"willbedeprecated.Pleasechangeyourcode/manifesttouse"Set-EnvVar"-> :36:1WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :38:31InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.WARN"strip_path"willbedeprecated.Pleasechangeyourcode/manifesttouse"Split-PathLikeEnvVar"-> :40:33InvalidOperation: C:\Users\[redacted]\scoop\apps\scoop\current\lib\system.ps1:85Line|85|$splitPattern=$Pattern.Split(';', [System.StringSplitOption …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Youcannotcallamethodonanull-valuedexpression.Linking ~\scoop\apps\sdl2\current=> ~\scoop\apps\sdl2\2.30.3'sdl2' (2.30.3) wasinstalledsuccessfully!
Like this, other manifests mentioned above which contains scripts including strip_path are trouble.
Possible Solution
Update scripts in the manifest and code on Scoop.
Both installer and uninstaller scripts have deprecated functions, strip_path and env, which are implemented at lib/System.ps1 in Scoop. Originally strip_path invoked Test-PathLikeEnvVar internally, but in recent commit, it it changed to Split-PathLikeEnvVar and the new one receives the parameter as a string array named -Pattern instead of -Name.
Although Split-PathLikeEnvVar has a change in its parameters, strip_path function is not responded to the change yet.
Thus, both scripts and Scoop code should be updated to troubleshoot this issue.
Scoop and Buckets Version
PS> scoop --version
Current Scoop version:
d285bb08 (HEAD -> master, tag: v0.4.1, origin/master, origin/HEAD) chore(release): Bump to version 0.4.1 (#5924)'main' bucket:
beb95ba0c (HEAD -> master, origin/master, origin/HEAD) firebase: Update to version 13.8.0'extras' bucket:
f973734d8 (HEAD -> master, origin/master, origin/HEAD) kakaotalk@4.0.0.3881: Fix hash (Closes #13211)'versions' bucket:
9297fe804 (HEAD -> master, origin/master, origin/HEAD) vim-nightly: Update to version 9.1.0386'nirsoft' bucket:
08dbf0e (HEAD -> master, origin/master, origin/HEAD) 'updated''java' bucket:
469998e8 (HEAD -> master, origin/master, origin/HEAD) zulufx8-jre: Update to version 8.78.0.19'games' bucket:
0b604611f (HEAD -> master, origin/master, origin/HEAD) steam-rom-manager: Update to version 2.4.26
PS>$PSVersionTable
Name Value
---------
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Additional Softwares
No response
The text was updated successfully, but these errors were encountered:
Capella87
changed the title
[Bug]: sdl2's installer and uninstaller scripts have some invalid operations
[Bug]: Some manifests' installer and uninstaller scripts have some invalid operations
May 6, 2024
Prerequisites
Package Name
sdl2, sdl2-ttf, sdl2-mixer, sdl2-image, raylib, raylib-mingw, libsndfile
Expected/Current Behaviour
There are script errors when running installer and uninstaller script. installation and update themselves are working with those problems. Also, it would be better to remove deprecated things in the scripts..
Steps to Reproduce
Like this, other manifests mentioned above which contains scripts including
strip_path
are trouble.Possible Solution
Update scripts in the manifest and code on Scoop.
Both installer and uninstaller scripts have deprecated functions,
strip_path
andenv
, which are implemented atlib/System.ps1
in Scoop. Originallystrip_path
invokedTest-PathLikeEnvVar
internally, but in recent commit, it it changed toSplit-PathLikeEnvVar
and the new one receives the parameter as a string array named-Pattern
instead of-Name
.Although
Split-PathLikeEnvVar
has a change in its parameters,strip_path
function is not responded to the change yet.Thus, both scripts and Scoop code should be updated to troubleshoot this issue.
Scoop and Buckets Version
Scoop Config
PowerShell Version
Additional Softwares
No response
The text was updated successfully, but these errors were encountered: