mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-24 21:58:58 +01:00
[update] Fix endless update loop for linux_exe
builds (#11827)
Closes #11808 Authored by: bashonly
This commit is contained in:
parent
2037a6414f
commit
3d3ee458c1
1 changed files with 7 additions and 2 deletions
|
@ -525,11 +525,16 @@ class Updater:
|
|||
@functools.cached_property
|
||||
def cmd(self):
|
||||
"""The command-line to run the executable, if known"""
|
||||
argv = None
|
||||
# There is no sys.orig_argv in py < 3.10. Also, it can be [] when frozen
|
||||
if getattr(sys, 'orig_argv', None):
|
||||
return sys.orig_argv
|
||||
argv = sys.orig_argv
|
||||
elif getattr(sys, 'frozen', False):
|
||||
return sys.argv
|
||||
argv = sys.argv
|
||||
# linux_static exe's argv[0] will be /tmp/staticx-NNNN/yt-dlp_linux if we don't fixup here
|
||||
if argv and os.getenv('STATICX_PROG_PATH'):
|
||||
argv = [self.filename, *argv[1:]]
|
||||
return argv
|
||||
|
||||
def restart(self):
|
||||
"""Restart the executable"""
|
||||
|
|
Loading…
Reference in a new issue