summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herman <davidherman@google.com>2015-08-04 09:18:24 -0700
committerDavid Herman <davidherman@google.com>2015-08-04 09:18:24 -0700
commitb023211bab334e2243c80e459f2504ccb92ab9f2 (patch)
tree85690ac8afbd33f26ea234825b29f7e87631c7b8
parentf48582b1ddfe2db038042e6ec82d87dd391d5be5 (diff)
downloadswt-b023211bab334e2243c80e459f2504ccb92ab9f2.tar.gz
Quote xcopy arguments to fix "Invalid number of parameters" error
On Windows, android.bat calls xcopy with %TEMP% as part of its arguments. If android.bat is called from MSYS (like Git Bash) %TEMP% contains forward slashes, confusing xcopy which is trying to take the path as command line arguments. This causes the "Invalid number of parameters" error message on the console. Fix this by quoting the path arguments to xcopy. Change-Id: I24b75b44610b539614ea42f26d702eb3da9514e6
-rwxr-xr-xsdkmanager/app/etc/android.bat4
1 files changed, 2 insertions, 2 deletions
diff --git a/sdkmanager/app/etc/android.bat b/sdkmanager/app/etc/android.bat
index 767e4d5..8690b77 100755
--- a/sdkmanager/app/etc/android.bat
+++ b/sdkmanager/app/etc/android.bat
@@ -47,7 +47,7 @@ for /f "delims=" %%a in ('"%java_exe%" -jar lib\archquery.jar') do set swt_path=
rem This avoids locking the tool dir in case the user is trying to update it.
set tmp_dir=%TEMP%\temp-android-tool
- xcopy %swt_path% %tmp_dir%\%swt_path% /I /E /C /G /R /Y /Q > nul
+ xcopy "%swt_path%" "%tmp_dir%\%swt_path%" /I /E /C /G /R /Y /Q > nul
copy /B /D /Y lib\common.jar %tmp_dir%\lib\ > nul
copy /B /D /Y lib\commons-codec* %tmp_dir%\lib\ > nul
copy /B /D /Y lib\commons-compress* %tmp_dir%\lib\ > nul
@@ -65,7 +65,7 @@ for /f "delims=" %%a in ('"%java_exe%" -jar lib\archquery.jar') do set swt_path=
rem jar_path and swt_path are relative to PWD so we don't need to adjust them, just change dirs.
set tools_dir=%cd%
- cd /d %tmp_dir%
+ cd /d "%tmp_dir%"
:EndTempCopy