You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This ensures no other ruby.exe processes are running before installing
326
+
if ($InstallDir) {
327
+
$escapedInstallDir=$InstallDir-replace'\\','\\'
328
+
}
329
+
if (Test-Path"$escapedInstallDir\puppet\bin\ruby.exe") { # The first time an upgrade is run with InstallDir, ruby.exe will not yet exist there yet
330
+
$other_ruby_process_id=Get-CimInstance Win32_Process -Filter "Name='ruby.exe' AND ExecutablePath LIKE '$escapedInstallDir\\puppet\\bin\\ruby.exe'"|Select-Object-First 1-ExpandProperty ProcessID
331
+
} else {
332
+
$other_ruby_process_id=Get-CimInstance Win32_Process -Filter "Name='ruby.exe' AND ExecutablePath LIKE 'C:\\Program Files\\Puppet Labs\\Puppet\\puppet\\bin\\ruby.exe%'"|Select-Object-First 1-ExpandProperty ProcessID
333
+
}
334
+
if ($other_ruby_process_id) {
335
+
Write-Log"Waiting for other ruby process to stop, PID: $other_ruby_process_id"$Logfile
0 commit comments