Skip to content

Commit 40d2b6e

Browse files
author
jenkins
committed
fix: github organization as relative path issue
Normalize as absolute path for all usages
1 parent 432c610 commit 40d2b6e

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

build.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,9 +1730,12 @@ def create_docker_build_script(script_name, container_install_dir, container_ci_
17301730
# (TRITON_REPO_ORGANIZATION), so pointing it at a local mirror is the
17311731
# only way to resolve deeply-nested clones (e.g. core -> common)
17321732
# offline; FETCHCONTENT_SOURCE_DIR overrides do not reach those builds.
1733+
# FLAGS.github_organization is already normalized as an absolute path
17331734
if FLAGS.github_organization and os.path.isdir(FLAGS.github_organization):
1734-
org_abs = os.path.abspath(FLAGS.github_organization)
1735-
runargs += ["-v", f"{org_abs}:{org_abs}"]
1735+
runargs += [
1736+
"-v",
1737+
f"{FLAGS.github_organization}:{FLAGS.github_organization}",
1738+
]
17361739
if FLAGS.use_user_docker_config:
17371740
if os.path.exists(FLAGS.use_user_docker_config):
17381741
runargs += [
@@ -2756,6 +2759,12 @@ def enable_all():
27562759
if FLAGS.build_secret is None:
27572760
FLAGS.build_secret = []
27582761

2762+
# When --github-organization is a local directory, resolve it to an absolute
2763+
# path, so nested clones and CMake's TRITON_REPO_ORGANIZATION properly reference it.
2764+
# Absolute values and remote URLs are left unchanged.
2765+
if FLAGS.github_organization and os.path.isdir(FLAGS.github_organization):
2766+
FLAGS.github_organization = os.path.abspath(FLAGS.github_organization)
2767+
27592768
FLAGS.boost_url = os.getenv(
27602769
"TRITON_BOOST_URL",
27612770
"https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz",

0 commit comments

Comments
 (0)