Skip to content

Commit

Permalink
fix for #22461 jar with empty ClassPath attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
philwalk committed Jan 28, 2025
1 parent ef7f217 commit 5e2bcf1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ class ClassPathFactory {
a <- ClassPath.expandManifestPath(file.absolutePath)
path = java.nio.file.Paths.get(a.toURI()).nn
if Files.exists(path)
entry = AbstractFile.getFile(path)
if Option(entry).nonEmpty
yield
newClassPath(AbstractFile.getFile(path))
newClassPath(entry)
else
Seq.empty

Expand Down
19 changes: 7 additions & 12 deletions dist/libexec/common-shared
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@
# * Credits: This script is based on the script generated by sbt-pack.
# *--------------------------------------------------------------------------*/

if [ -e /usr/bin/tty -a "`tty`" != "not a tty" -a ! -p /dev/stdin ]; then
isterminal=1
# save terminal settings
saved_stty=$(stty -g 2>/dev/null)
# clear on error so we don't later try to restore them
if [[ ! $? ]]; then
saved_stty=""
fi
else
isterminal=0
# save terminal settings
saved_stty=$(stty -g 2>/dev/null)
# clear on error so we don't later try to restore them
if [[ ! $? ]]; then
saved_stty=""
fi

# restore stty settings (echo in particular)
function restoreSttySettings() {
[ $isterminal -eq 1 ] && stty $saved_stty
stty $saved_stty
saved_stty=""
}

Expand Down Expand Up @@ -66,7 +61,7 @@ if [[ ${cygwin-} || ${mingw-} || ${msys-} ]]; then
CYGPATHCMD=`which cygpath 2>/dev/null`
case "$TERM" in
rxvt* | xterm* | cygwin*)
[ $isterminal -eq 1 ] && stty -icanon min 1 -echo
stty -icanon min 1 -echo
JAVA_OPTS="$JAVA_OPTS -Djline.terminal=unix"
;;
esac
Expand Down

0 comments on commit 5e2bcf1

Please # to comment.