A feature-rich command-line audio/video downloader
[update] Fix endless update loop for `linux_exe` builds (#11827)
bashonly3d3ee458c1fe
diff --git a/yt_dlp/update.py b/yt_dlp/update.pyindex ca2ec5f376..dfab132afd 100644--- a/yt_dlp/update.py+++ b/yt_dlp/update.py@@ -525,11 +525,16 @@ class Updater:@functools.cached_propertydef 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 frozenif getattr(sys, 'orig_argv', None):- return sys.orig_argv+ argv = sys.orig_argvelif 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 argvdef restart(self):"""Restart the executable"""