Skip to content

Commit 9bb4be1

Browse files
committed
pip: Ensure runtime is always specified with id branch format
Otherwise Flatpak may not be able to execute it if multiple branches exist
1 parent 6f55d8b commit 9bb4be1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pip/flatpak-pip-generator.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"--runtime",
7171
help=(
7272
"Specify a flatpak to run pip inside of a sandbox, "
73-
"ensures python version compatibility"
73+
"ensures python version compatibility. Format: $RUNTIME_ID//$RUNTIME_BRANCH"
7474
),
7575
)
7676
parser.add_argument(
@@ -334,6 +334,12 @@ def fprint(string: str) -> None:
334334
pip_executable = "pip2" if opts.python2 else "pip3"
335335

336336
if opts.runtime:
337+
parts = opts.runtime.split("//", 1)
338+
if len(parts) != 2 or not parts[0] or not parts[1]:
339+
sys.exit(
340+
"Runtime argument must be in the following format: $RUNTIME_ID//$RUNTIME_BRANCH"
341+
)
342+
337343
flatpak_cmd = [
338344
"flatpak",
339345
"--devel",

0 commit comments

Comments
 (0)