Fix make_update running on a freshly cloned Blender fork #105858

Merged
Sergey Sharybin merged 1 commits from Sergey/blender:make_update into blender-v3.5-release 2023-03-17 18:07:43 +01:00
1 changed files with 5 additions and 0 deletions

View File

@ -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))