aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_InfoExtractor.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-05-26 01:13:34 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-05-26 01:13:34 +0530
commitb25522ba5234bc9c313d18b54001c2e5e9e39c96 (patch)
tree29cf8101d4523e80eda504059c8e5076755dae6e /test/test_InfoExtractor.py
parentc19bc311cbc415c8683c5bc34286d8f079e60e70 (diff)
downloadhypervideo-pre-b25522ba5234bc9c313d18b54001c2e5e9e39c96.tar.lz
hypervideo-pre-b25522ba5234bc9c313d18b54001c2e5e9e39c96.tar.xz
hypervideo-pre-b25522ba5234bc9c313d18b54001c2e5e9e39c96.zip
[update] Replace self without launching a subprocess in windows
Closes: #335, https://github.com/ytdl-org/youtube-dl/issues/28488, https://github.com/ytdl-org/youtube-dl/issues/5810, https://github.com/ytdl-org/youtube-dl/issues/5994 In windows, a running executable cannot be replaced. So, the old updater worked by launching a batch script and then exiting, so that the batch script can replace the executable. However, this caused the above-mentioned issues. The new method takes advantage of the fact that while the executable cannot be replaced or deleted, it can still be renamed. The current update process on windows is as follows: 1. Delete `yt-dlp.exe.old` if it exists 2. Download the new version as `yt-dlp.exe.new` 3. Rename the running exe to `yt-dlp.exe.old` 4. Rename `yt-dlp.exe.new` to `yt-dlp.exe` 5. Open a shell that deletes `yt-dlp.exe.old` and terminate While we still use a subprocess, the actual update is already done before the app terminates and the batch script does not print anything to stdout/stderr. So this solves all the above issues
Diffstat (limited to 'test/test_InfoExtractor.py')
0 files changed, 0 insertions, 0 deletions