mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-10-30 06:07:56 +00:00
fix(shim): Restore original path for JAR cmd (#6030)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
- **core:** Use correct path in 'bash' ([#6006](https://github.com/ScoopInstaller/Scoop/issues/6006))
|
||||
- **core:** Limit the number of commands to get when search for git executable ([#6013](https://github.com/ScoopInstaller/Scoop/pull/6013))
|
||||
- **checkver:** Correct error messages ([#6024](https://github.com/ScoopInstaller/Scoop/issues/6024))
|
||||
- **shim:** Restore original path for JAR cmd ([#6030](https://github.com/ScoopInstaller/Scoop/issues/6030))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
|
||||
@@ -1038,8 +1038,9 @@ function shim($path, $global, $name, $arg) {
|
||||
warn_on_overwrite "$shim.cmd" $path
|
||||
@(
|
||||
"@rem $resolved_path",
|
||||
"@cd /d $(Split-Path $resolved_path -Parent)"
|
||||
"@java -jar `"$resolved_path`" $arg %*"
|
||||
"@pushd $(Split-Path $resolved_path -Parent)",
|
||||
"@java -jar `"$resolved_path`" $arg %*",
|
||||
"@popd"
|
||||
) -join "`r`n" | Out-UTF8File "$shim.cmd"
|
||||
|
||||
warn_on_overwrite $shim $path
|
||||
|
||||
Reference in New Issue
Block a user