Do not remove build directory on failure
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							9919281d98
						
					
				
				
					commit
					8aa2c35793
				
			@@ -57,7 +57,6 @@ def run_cmake(command, build_path, default_build_path):
 | 
				
			|||||||
    Execute CMake command.
 | 
					    Execute CMake command.
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    from subprocess import Popen, PIPE
 | 
					    from subprocess import Popen, PIPE
 | 
				
			||||||
    from shutil import rmtree
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    topdir = os.getcwd()
 | 
					    topdir = os.getcwd()
 | 
				
			||||||
    p = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
 | 
					    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:
 | 
					    if configuration_successful:
 | 
				
			||||||
        save_setup_command(sys.argv, build_path)
 | 
					        save_setup_command(sys.argv, build_path)
 | 
				
			||||||
        print_build_help(build_path, default_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):
 | 
					def print_build_help(build_path, default_build_path):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user