[CONFIGURE] Fix warnings shown when parsing cmdline
authorMark Jansen <mark.jansen@reactos.org>
Sun, 11 Apr 2021 12:25:08 +0000 (14:25 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Sun, 18 Apr 2021 11:40:30 +0000 (13:40 +0200)
configure.cmd

index 2d78076..813fb48 100755 (executable)
@@ -87,8 +87,8 @@ REM Parse command line parameters
             echo Please run this command in a [Developer] Command Prompt for Visual Studio.
             goto quit
         ) else if /I "%1" NEQ "" (
-            echo %1| find /I "-D" > NUL
-            if %ERRORLEVEL% == 0 (
+            echo.%1| find /I "-D" >nul 2>&1
+            if not errorlevel 1 (
                 REM User is passing a switch to CMake
                 REM Ignore it, and ignore the next parameter that follows
                 Shift
@@ -123,8 +123,8 @@ REM Parse command line parameters
                 set CMAKE_ARCH=-A ARM
             )
         ) else if /I "%1" NEQ "" (
-            echo %1| find /I "-D" > NUL
-            if %ERRORLEVEL% == 0 (
+            echo.%1| find /I "-D" >nul 2>&1
+            if not errorlevel 1 (
                 REM User is passing a switch to CMake
                 REM Ignore it, and ignore the next parameter that follows
                 Shift