Skip to content

Commit 0f848f7

Browse files
committed
handle $R2D_ENTRYPOINT in new entrypoint
1 parent a06991d commit 0f848f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

repo2docker/buildpacks/repo2docker-entrypoint

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
2-
# note: must run on Python >= 3.5
2+
# note: must run on Python >= 3.5, which mainly means no f-strings
33

44
# goals:
55
# - load environment variables from a login shell (bash -l)
@@ -84,8 +84,13 @@ def main():
8484
"a",
8585
)
8686

87+
command = sys.argv[1:]
88+
r2d_entrypoint = os.environ.get("R2D_ENTRYPOINT")
89+
if r2d_entrypoint:
90+
command.insert(0, r2d_entrypoint)
91+
8792
child = subprocess.Popen(
88-
sys.argv[1:],
93+
command,
8994
bufsize=1,
9095
env=env,
9196
start_new_session=True,

0 commit comments

Comments
 (0)