fix: Argcfile.sh on windows (#42)
This commit is contained in:
+8
-1
@@ -457,7 +457,12 @@ install() {
|
||||
_die "error: your aichat version don't support function calling"
|
||||
fi
|
||||
if [[ ! -e "$functions_dir" ]]; then
|
||||
ln -s "$(pwd)" "$functions_dir"
|
||||
if _is_win; then
|
||||
current_dir="$(cygpath -w "$(pwd)")"
|
||||
cmd <<< "mklink /D \"${functions_dir%/}\" \"${current_dir%/}\"" > /dev/null
|
||||
else
|
||||
ln -s "$(pwd)" "$functions_dir"
|
||||
fi
|
||||
echo "$functions_dir symlinked"
|
||||
else
|
||||
echo "$functions_dir already exists"
|
||||
@@ -598,5 +603,7 @@ _die() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if _is_win; then set -o igncr; fi
|
||||
|
||||
# See more details at https://github.com/sigoden/argc
|
||||
eval "$(argc --argc-eval "$0" "$@")"
|
||||
|
||||
Reference in New Issue
Block a user