tt-help-cli-ycl 1.3.74 → 1.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/browser/cdp.js +3 -2
package/package.json
CHANGED
package/src/lib/browser/cdp.js
CHANGED
|
@@ -111,10 +111,11 @@ function killEdgeProcesses(targetDir) {
|
|
|
111
111
|
`$count = 0; ` +
|
|
112
112
|
`foreach ($p in $procs) { ` +
|
|
113
113
|
` if ($p.CommandLine -and $p.CommandLine -like "*${escapedDir}*") { ` +
|
|
114
|
-
`
|
|
114
|
+
` taskkill /F /T /PID $p.ProcessId 2>$null; ` +
|
|
115
115
|
` $count++ ` +
|
|
116
116
|
` } ` +
|
|
117
117
|
`}; ` +
|
|
118
|
+
`Start-Sleep -Milliseconds 500; ` +
|
|
118
119
|
`Get-ChildItem "$env:LOCALAPPDATA\\Microsoft\\Edge\\Singleton*" -ErrorAction SilentlyContinue | Remove-Item -Force; ` +
|
|
119
120
|
`Write-Output $count`;
|
|
120
121
|
fs.writeFileSync(ps1Path, ps1Content);
|
|
@@ -123,7 +124,7 @@ function killEdgeProcesses(targetDir) {
|
|
|
123
124
|
)
|
|
124
125
|
.toString()
|
|
125
126
|
.trim();
|
|
126
|
-
fs.unlinkSync(ps1Path);
|
|
127
|
+
try { fs.unlinkSync(ps1Path); } catch {}
|
|
127
128
|
command = "exit 0";
|
|
128
129
|
} catch {
|
|
129
130
|
command = "taskkill /F /IM msedge.exe 2>nul || exit 0";
|