Merge pull request #252 from dev-cafe/robertodr-patch-1

Do not remove build directory on failure
This commit is contained in:
Radovan Bast 2018-08-22 18:05:05 +02:00 committed by GitHub
commit 30e231950b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,6 @@ def run_cmake(command, build_path, default_build_path):
Execute CMake command.
"""
from subprocess import Popen, PIPE
from shutil import rmtree
topdir = os.getcwd()
p = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
@ -91,11 +90,6 @@ def run_cmake(command, build_path, default_build_path):
if configuration_successful:
save_setup_command(sys.argv, build_path)
print_build_help(build_path, default_build_path)
else:
if (build_path == default_build_path):
# remove build_path iff not set by the user
# otherwise removal can be dangerous
rmtree(default_build_path)
def print_build_help(build_path, default_build_path):