Skip to content

Commit ba74b62

Browse files
committed
Fixed support for gitbash
1 parent 6abc204 commit ba74b62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/kscript

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44

55
absolute_path() {
6-
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
6+
# if the given path to the kscript launcher is abosulte (i.e. it is either starting with / or a
7+
# 'letter:/' when using gitbash on windows) it is returned unchanged, otherwise we construct an absolute path
8+
[[ $1 = /* ]] || [[ $1 =~ ^[A-z]:/ ]] && echo "$1" || echo "$PWD/${1#./}"
79
}
810

911
resolve_symlink() (

0 commit comments

Comments
 (0)