diff --git a/cfbs/commands.py b/cfbs/commands.py index 531df2ae..2ce8efb1 100644 --- a/cfbs/commands.py +++ b/cfbs/commands.py @@ -562,7 +562,7 @@ def _someone_needs_me(this) -> bool: return 0 -def update_input_data(module, input_data): +def update_input_data(module, input_data) -> bool: """ Update input data from module definition @@ -666,7 +666,7 @@ def _update_variable(input_def, input_data): @cfbs_command("update") @commit_after_command("Updated module%s", [PLURAL_S]) -def update_command(to_update): +def update_command(to_update) -> Result: config = CFBSConfig.get_instance() config.warn_about_unknown_keys() build = config["build"] @@ -959,9 +959,12 @@ def build_command(ignore_versions=False) -> int: + "\nPlease see the error messages above and apply fixes accordingly." + "\nIf not fixed, these errors will cause your project to not build in future cfbs versions." ) + # We want the cfbs build command to be as backwards compatible as possible, + # so we try building anyway and don't return error(s) init_out_folder() _download_dependencies(config, prefer_offline=True, ignore_versions=ignore_versions) - perform_build_steps(config) + r = perform_build_steps(config) + return r @cfbs_command("install") @@ -1074,7 +1077,7 @@ def analyze_command( user_ignored_path_components=None, offline=False, verbose=False, -): +) -> int: if len(policyset_paths) == 0: # no policyset path is a shorthand for using the current directory as the policyset path log.info( @@ -1138,7 +1141,7 @@ def analyze_command( @cfbs_command("input") @commit_after_command("Added input for module%s", [PLURAL_S]) -def input_command(args, input_from="cfbs input"): +def input_command(args, input_from="cfbs input") -> Result: config = CFBSConfig.get_instance() config.warn_about_unknown_keys() do_commit = False @@ -1256,7 +1259,7 @@ def _compare_list(a, b): @cfbs_command("get-input") -def get_input_command(name, outfile): +def get_input_command(name, outfile) -> int: config = CFBSConfig.get_instance() config.warn_about_unknown_keys() module = config.get_module_from_build(name)