Remove trailing space only if string is not empty

Bug: dartbug.com/32003
Change-Id: Ia4160e438ac7f98ae607098761618623f6fd0501
Reviewed-on: https://dart-review.googlesource.com/37841
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This commit is contained in:
Alexander Aprelev 2018-01-31 16:06:06 +00:00 committed by commit-bot@chromium.org
parent a4dd9d0a87
commit 0a79c54cee

View file

@ -13,10 +13,12 @@ if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
set OUT_DIR=%SCRIPTPATH%/../../../out/
REM Remove trailing spaces
set DART_CONFIGURATION=%DART_CONFIGURATION: =%
REM Remove trailing spaces if line is not empty
if not "%DART_CONFIGURATION%" == "" (
set DART_CONFIGURATION=%DART_CONFIGURATION: =%
)
if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64
if "%DART_USE_SDK%"=="" set DART_USE_SDK=0
set BUILD_DIR=%OUT_DIR%%DART_CONFIGURATION%