Fix flashing cmd window during update check (#8721)
* Fix flashing command prompt during update check -use GetScriptPath and GetRuntimePath to assign vas in UpdateCheck.lua -fixes flashing command prompt caused by io.popen -fall back to "." if unable to determine paths * Define scriptPath and runtimePath as local -preserves original definition, prevents global namespace pollution
This commit is contained in:
@@ -78,13 +78,9 @@ end
|
||||
|
||||
ConPrintf("Checking for update...")
|
||||
|
||||
local scriptPath
|
||||
local runtimePath
|
||||
do
|
||||
local currentDir = io.popen("cd"):read() or io.popen("pwd"):read() or "."
|
||||
scriptPath = currentDir
|
||||
runtimePath = currentDir
|
||||
end
|
||||
-- Use built-in helpers to obtain absolute paths without spawning a shell.
|
||||
local scriptPath = (GetScriptPath and GetScriptPath()) or "."
|
||||
local runtimePath = (GetRuntimePath and GetRuntimePath()) or scriptPath
|
||||
|
||||
-- Load and process local manifest
|
||||
local localVer
|
||||
|
||||
Reference in New Issue
Block a user