Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions cfbs/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down