From faaab971861012d0569bf292313bf47ce890dd4b Mon Sep 17 00:00:00 2001 From: Charuka Tharindu Date: Thu, 17 Aug 2023 11:37:00 +0530 Subject: [PATCH] Differentiate between 'bal dist update' and 'bal tool update' --- resources/bin/bal | 2 +- resources/bin/bal.bat | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/bin/bal b/resources/bin/bal index 21dcd7f6..da1531f1 100755 --- a/resources/bin/bal +++ b/resources/bin/bal @@ -66,7 +66,7 @@ RUN_COMMAND=false RUN_BALLERINA=true - if [ "$1" == "dist" ] || [ "$2" == "dist" ] || [ "$1" == "update" ]|| [ "$2" == "update" ] + if [ "$1" == "dist" ] || [ "$2" == "dist" ] || [ "$1" == "update" ] || ( [ "$1" == "dist" ] && [ "$2" == "update" ] ) then RUN_COMMAND=true RUN_BALLERINA=false diff --git a/resources/bin/bal.bat b/resources/bin/bal.bat index 5ed4f353..3882d2f8 100644 --- a/resources/bin/bal.bat +++ b/resources/bin/bal.bat @@ -29,7 +29,11 @@ set JAVA_CMD=java if "%1" == "dist" set dist=true if "%~2" == "dist" set dist=true if "%1" == "update" set dist=true -if "%~2" == "update" set dist=true +if "%~2" == "update" ( + if "%1" == "dist" ( + set dist=true + ) +) if "%1" == "build" set dist=true if "%1" == "update" set update=true if "%1" == "build" set build=true