Do not remove build directory on failure

This commit is contained in:
Roberto Di Remigio 2018-08-22 11:47:17 -04:00 committed by GitHub
parent 9919281d98
commit 8aa2c35793
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):