Skip to content

Commit

Permalink
fixes of path scripts's return
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Jan 29, 2025
1 parent 1168a7c commit 518383c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion path/fount.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
setlocal enabledelayedexpansion
powershell.exe -noprofile -executionpolicy bypass -file "%~dp0fount.ps1" %*
exit %ERRORLEVEL%
exit /b %ERRORLEVEL%
@echo on
6 changes: 3 additions & 3 deletions path/fount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_package() {
apk add --update "$1"
else
echo "无法安装 $1"
exit 1
return 1
fi
}

Expand Down Expand Up @@ -125,7 +125,7 @@ EOF
fi
if ! command -v deno &> /dev/null; then
echo "Deno missing, you cant run fount without deno"
exit 1
return 1
else
echo "Deno installed"
fi
Expand All @@ -151,7 +151,7 @@ run() {
fi
}
if [[ $# -gt 0 && $1 = 'init' ]]; then
exit 0
return 0
elif [[ $# -gt 0 && $1 = 'keepalive' ]]; then
runargs=($@[1:])
run @runargs
Expand Down
4 changes: 2 additions & 2 deletions run.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
cmd /c "%~dp0/path/fount.bat" %*
"%~dp0/path/fount.bat" %*
if %ERRORLEVEL% NEQ 0 if %ERRORLEVEL% NEQ 255 pause
exit %ERRORLEVEL%
exit /b %ERRORLEVEL%
@echo on
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ if [[ $RETURN_CODE -ne 0 ]] && [[ $RETURN_CODE -ne 255 ]]; then
read -n 1 -s -r -p "Press any key to continue..."
echo
fi
exit $RETURN_CODE
return $RETURN_CODE

0 comments on commit 518383c

Please sign in to comment.