Skip to content

Commit

Permalink
Support windows newlines in modules file
Browse files Browse the repository at this point in the history
  • Loading branch information
LadyCailin committed Apr 12, 2019
1 parent e304652 commit 9dfbabf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/interpreter-helpers/bash.sh
Expand Up @@ -47,6 +47,8 @@ if [[ "$(jdk_version)" -gt "8" ]]; then
# Read the required modules from the jar itself, so that each jar can have different dependencies, without requiring
# a re-install.
MODULES=$(unzip -p "%%LOCATION%%" interpreter-helpers/modules)
# Ensure that the modules file will work even if it has windows line endings
MODULES=$(echo "$MODULES" | sed 's/\r$//g')
MPATH=$(echo "$MODULES" | sed 's/\(.*\)/--add-opens \1=ALL-UNNAMED/' | tr '\n' ' ')
else
MPATH=""
Expand Down

0 comments on commit 9dfbabf

Please sign in to comment.