aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2021-03-07 08:00:54 -0800
committerZac Medico <zmedico@gentoo.org>2021-03-07 08:01:47 -0800
commitb08e21e5a7e07da02a2d64dac80635ca82a12979 (patch)
treecda40d52397839187f1211f687b28c52b43b0f8f
parentEbuildPhase: Use async and await syntax (diff)
downloadportage-b08e21e5a7e07da02a2d64dac80635ca82a12979.tar.gz
portage-b08e21e5a7e07da02a2d64dac80635ca82a12979.tar.bz2
portage-b08e21e5a7e07da02a2d64dac80635ca82a12979.zip
bin_entry_point: fix sys.argv[0] for non-python programs
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/portage/util/bin_entry_point.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/portage/util/bin_entry_point.py b/lib/portage/util/bin_entry_point.py
index 7d359052e..3ead95d98 100644
--- a/lib/portage/util/bin_entry_point.py
+++ b/lib/portage/util/bin_entry_point.py
@@ -28,6 +28,7 @@ def bin_entry_point():
script_path,
] + sys.argv[1:]
os.execvp(sys.argv[0], sys.argv)
+ sys.argv[0] = script_path
os.execvp(sys.argv[0], sys.argv)
else:
print("File not found:", script_path, file=sys.stderr)