forked from bartvdbraak/blender
Fix make_update running on a freshly cloned Blender fork
Simple logic: when the repository is not found under the relative path to the main repository's origin, enforce clone of the upstream repository instead. Pull Request: https://projects.blender.org/blender/blender/pulls/105858
This commit is contained in:
parent
11b16c4ae3
commit
ddec556ef3
@ -320,6 +320,11 @@ def external_script_initialize_if_needed(args: argparse.Namespace,
|
||||
blender_url = make_utils.git_get_remote_url(args.git_command, origin_name)
|
||||
external_url = resolve_external_url(blender_url, repo_name)
|
||||
|
||||
# When running `make update` from a freshly cloned fork check whether the fork of the submodule is
|
||||
# available, If not, switch to the submodule relative to the main blender repository.
|
||||
if origin_name == "origin" and not make_utils.git_is_remote_repository(args.git_command, external_url):
|
||||
external_url = resolve_external_url("https://projects.blender.org/blender/blender", repo_name)
|
||||
|
||||
call((args.git_command, "clone", "--origin", origin_name, external_url, external_dir))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user