Skip to content

Commit

Permalink
fix(shim): Restore original path for JAR cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven committed Jun 25, 2024
1 parent d8b3cc8 commit 0600251
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0600251

Please sign in to comment.