Skip to content

Commit

Permalink
Handle kotlinc symbolic link for determining KOTLIN_DIR
Browse files Browse the repository at this point in the history
Find the real path of `kotlinc` in case it is a symbolic link, ensuring that the correct compiler directory containing `kotlinc` is determined. Previously, it directly used `dirname` on the result of `command -v kotlinc`, which could have led to incorrect directory when `kotlinc` was a symbolic link, and as a result, not finding the `kotlin-stdlib.jar` latter in the script.
  • Loading branch information
agcom authored and vmcj committed Oct 10, 2023
1 parent f6d2960 commit c9add07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql/files/defaultdata/kt/run
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COMPILESCRIPTDIR="$(dirname "$0")"
# Note that you then also might want to fix this in the compiler and runner version commands.
# For example
# KOTLIN_DIR=/usr/lib/kotlinc/bin
KOTLIN_DIR="$(dirname "$(command -v kotlinc)")"
KOTLIN_DIR="$(dirname "$(realpath "$(command -v kotlinc)")")"

# Stack size in the JVM in KB. Note that this will be deducted from
# the total memory made available for the heap.
Expand Down

0 comments on commit c9add07

Please sign in to comment.