diff --git a/tools/building.py b/tools/building.py index 4bcc86428b..0f55d9bca2 100644 --- a/tools/building.py +++ b/tools/building.py @@ -959,7 +959,7 @@ def EndBuilding(target, program = None): if not isinstance(project_path, str) or len(project_path) == 0 : project_path = os.path.join(BSP_ROOT, 'rt-studio-project') MkDist(program, BSP_ROOT, Rtt_Root, Env, project_name, project_path) - child = subprocess.Popen('scons --target=eclipse --project-name=' + project_name, cwd=project_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) + child = subprocess.Popen('scons --target=eclipse --project-name="{}"'.format(project_name), cwd=project_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = child.communicate() need_exit = True if GetOption('cscope'): diff --git a/tools/mkdist.py b/tools/mkdist.py index 4570983156..b7ca7ffc56 100644 --- a/tools/mkdist.py +++ b/tools/mkdist.py @@ -376,13 +376,13 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, project_name, project_path): target_project_type = GetOption('target') if target_project_type: - child = subprocess.Popen('scons --target={} --project-name={}'.format(target_project_type, project_name), cwd=dist_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) + child = subprocess.Popen('scons --target={} --project-name="{}"'.format(target_project_type, project_name), cwd=dist_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = child.communicate() if child.returncode == 0: print(stdout) else: print(stderr) else: - print('suggest to use command scons --dist [--target=xxx] [--project-name=xxx] [--project-path=xxx]') + print('suggest to use command scons --dist [--target=xxx] [--project-name="xxx"] [--project-path="xxx"]') print('dist project successfully!')