attach functional
This commit is contained in:
@@ -35,7 +35,9 @@ namespace UnifiedFarmLauncher.Services
|
||||
|
||||
// Use Windows path format (backslashes) and ensure it's properly quoted
|
||||
// Add -NoExit to keep window open and ensure output is visible
|
||||
var remoteCmd = $"powershell.exe -NoLogo -NoProfile -NoExit -ExecutionPolicy Bypass -File \"{remoteHelper}\" {paramsBlock}";
|
||||
// Use -Command with & to properly invoke the script and avoid pipeline input issues
|
||||
var escapedHelper = remoteHelper.Replace("'", "''");
|
||||
var remoteCmd = $"powershell.exe -NoLogo -NoProfile -NoExit -ExecutionPolicy Bypass -Command \"& '{escapedHelper}' {paramsBlock}\"";
|
||||
|
||||
_sshService.StartInteractiveSsh(worker, remoteCmd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user