mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-10-16 21:28:37 +09:00
Run 'execute replacing bat file' using subprocess.Popen in order to prevent cmd window popup while running the 'bat' file.
This fix is relevant to the upgrade feature under windoes OS.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
import traceback
|
||||
import hashlib
|
||||
import subprocess
|
||||
from zipimport import zipimporter
|
||||
|
||||
from .utils import *
|
||||
@@ -125,7 +126,7 @@ del "%s"
|
||||
\n""" %(exe, exe, bat))
|
||||
b.close()
|
||||
|
||||
os.startfile(bat)
|
||||
subprocess.Popen(bat, shell=True)
|
||||
except (IOError, OSError) as err:
|
||||
if verbose: to_screen(compat_str(traceback.format_exc()))
|
||||
to_screen(u'ERROR: unable to overwrite current version')
|
||||
|
Reference in New Issue
Block a user