mirror of
https://github.com/revanced/revanced-cli.git
synced 2025-04-29 22:24:36 +02:00
24 lines
412 B
Batchfile
24 lines
412 B
Batchfile
@echo off
|
|
|
|
if "%~1"=="" (
|
|
set INVALID_ARGS=true
|
|
)
|
|
if defined INVALID_ARGS (
|
|
echo Run a command with arguments.
|
|
echo:
|
|
echo Usage: run.bat ^<command^> [arguments]
|
|
echo Example: run.bat echo Hello, World!
|
|
exit /b 1
|
|
)
|
|
|
|
%*
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
echo:
|
|
echo Failed to run command with exit code %ERRORLEVEL%.
|
|
echo Failed command: %*
|
|
echo:
|
|
pause
|
|
exit /b %ERRORLEVEL%
|
|
)
|