mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-04 00:13:20 +08:00
CB-12453: Remove unnecessary double quotes from .bat files which are the causes of crash if project path contains spaces
this closes #362
This commit is contained in:
parent
36d07d7a15
commit
2b53c98cf5
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0android_sdk_version"
|
SET script_path="%~dp0android_sdk_version"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'android_sdk_version' script in 'bin' folder, aborting...>&2
|
ECHO ERROR: Could not find 'android_sdk_version' script in 'bin' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0check_reqs"
|
SET script_path="%~dp0check_reqs"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2
|
ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0install-device"
|
SET script_path="%~dp0install-device"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2
|
ECHO ERROR: Could not find 'install-device' script in 'cordova\lib' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0install-emulator"
|
SET script_path="%~dp0install-emulator"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2
|
ECHO ERROR: Could not find 'install-emulator' script in 'cordova\lib' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0list-devices"
|
SET script_path="%~dp0list-devices"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2
|
ECHO ERROR: Could not find 'list-devices' script in 'cordova\lib' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0list-emulator-images"
|
SET script_path="%~dp0list-emulator-images"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2
|
ECHO ERROR: Could not find 'list-emulator-images' script in 'cordova\lib' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0list-started-emulators"
|
SET script_path="%~dp0list-started-emulators"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2
|
ECHO ERROR: Could not find 'list-started-emulators' script in 'cordova\lib' folder, aborting...>&2
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SET script_path="%~dp0start-emulator"
|
SET script_path="%~dp0start-emulator"
|
||||||
IF EXIST %script_path% (
|
IF EXIST %script_path% (
|
||||||
node "%script_path%" %*
|
node %script_path% %*
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2
|
ECHO ERROR: Could not find 'start-emulator' script in 'cordova\lib' folder, aborting...>&2
|
||||||
|
@ -45,7 +45,7 @@ module.exports.createProject = function (projectname, projectid, platformpath, c
|
|||||||
module.exports.removeProject(projectid);
|
module.exports.removeProject(projectid);
|
||||||
|
|
||||||
// create the project
|
// create the project
|
||||||
var command = util.format('%s %s %s "%s"', createScriptPath, projectDirName, projectid, projectname);
|
var command = util.format('"%s" %s %s "%s"', createScriptPath, projectDirName, projectid, projectname);
|
||||||
cp.exec(command, function (error, stdout, stderr) {
|
cp.exec(command, function (error, stdout, stderr) {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
@ -69,8 +69,7 @@ module.exports.updateProject = function (projectid, platformpath, callback) {
|
|||||||
}
|
}
|
||||||
var projectDirName = getDirName(projectid);
|
var projectDirName = getDirName(projectid);
|
||||||
var updateScriptPath = platformpath ? path.join(platformpath, 'bin/update') : path.join(cordova_bin, 'update');
|
var updateScriptPath = platformpath ? path.join(platformpath, 'bin/update') : path.join(cordova_bin, 'update');
|
||||||
var command = util.format('%s %s', updateScriptPath, projectDirName);
|
var command = util.format('"%s" %s', updateScriptPath, projectDirName);
|
||||||
|
|
||||||
cp.exec(command, function (error, stdout, stderr) {
|
cp.exec(command, function (error, stdout, stderr) {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log(stdout);
|
console.log(stdout);
|
||||||
|
Loading…
Reference in New Issue
Block a user