diff --git a/github_scripts/merge_sources.py b/github_scripts/merge_sources.py index db47d5b..de3577c 100755 --- a/github_scripts/merge_sources.py +++ b/github_scripts/merge_sources.py @@ -87,18 +87,23 @@ def main(): if not isinstance(opts, list): opts = [opts] - # Clone the first provided source - values = opts.pop(0) - get_source( - values["source"], - values["ref"], - dest, - dependency, - args.mirrors, - args.mirror_loc, - ) - # For all other sources, attempt to merge into the first - for values in opts: + for i, values in enumerate(opts): + if values["ref"] is None: + values["ref"] = "" + + # Clone the first provided source + if i == 0: + get_source( + values["source"], + values["ref"], + dest, + dependency, + args.mirrors, + args.mirror_loc, + ) + continue + + # For all other sources, attempt to merge into the first merge_source( values["source"], values["ref"], diff --git a/github_scripts/rose_stem_extract_source.py b/github_scripts/rose_stem_extract_source.py index 4b42e79..43b8f75 100755 --- a/github_scripts/rose_stem_extract_source.py +++ b/github_scripts/rose_stem_extract_source.py @@ -50,18 +50,22 @@ def main() -> None: if not isinstance(opts, list): opts = [opts] - # Clone the first provided source - values = opts.pop(0) - get_source( - values["source"], - values["ref"], - loc, - dependency, - use_mirrors, - mirror_loc, - ) - # For all other sources, attempt to merge into the first - for values in opts: + for i, values in enumerate(opts): + if values["ref"] is None: + values["ref"] = "" + + # Clone the first provided source + if i == 0: + get_source( + values["source"], + values["ref"], + loc, + dependency, + use_mirrors, + mirror_loc, + ) + continue + # For all other sources, attempt to merge into the first merge_source( values["source"], values["ref"],