Skip to content

Commit b75d0a3

Browse files
author
Aaron Eline
authored
convert_project.py now exits w/ non-zero on error (#614)
1 parent bfc3212 commit b75d0a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/tools/3c/utils/port_tools/convert_project.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ def parseTheArg():
7979
if not args.skip_exec and (not args.prog_name or not os.path.isfile(args.prog_name)):
8080
logging.error("Error: --prog_name argument is not a valid file..")
8181
logging.error("Provided argument: {} is not a file.".format(args.prog_name))
82-
sys.exit()
82+
sys.exit(1)
8383

8484
if not args.project_path or not os.path.isdir(args.project_path):
8585
logging.error("Error: --project_path argument must be the name of a directory.")
8686
logging.error("Provided argument: {} is not a directory.".format(args.project_path))
87-
sys.exit()
87+
sys.exit(1)
8888

8989
if not args.build_dir:
9090
args.build_dir = args.project_path
9191
if not os.path.isdir(args.build_dir):
9292
logging.error("Error: --build_dir argument must be the name of a directory.")
9393
logging.error("Provided argument: {} is not a directory.".format(args.build_dir))
94-
sys.exit()
94+
sys.exit(1)
9595

9696
return args
9797

@@ -104,7 +104,7 @@ def parseTheArg():
104104
if not os.path.exists(compileCmdsJson):
105105
logging.error("Error: Build directory does not contain compile_commands.json.")
106106
logging.error("compile_commands.json file: {} does not exist.".format(compileCmdsJson))
107-
sys.exit()
107+
sys.exit(1)
108108

109109
logging.info("Trying to convert all the source files to header files")
110110
run3C(progArgs.prog_name, progArgs.extra_3c_args,

0 commit comments

Comments
 (0)