mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-09-30 00:56:56 +13:00
More powershell fixes
This commit is contained in:
parent
0149137abe
commit
21a47de1fa
2 changed files with 4 additions and 4 deletions
|
@ -37,11 +37,11 @@ public class ApplicationHelper {
|
|||
}
|
||||
|
||||
public static String createDetachCommand(ShellControl pc, String command) {
|
||||
if (pc.getShellDialect().equals(ShellDialects.POWERSHELL)) {
|
||||
if (ShellDialects.isPowershell(pc)) {
|
||||
var script = ScriptHelper.createExecScript(pc, command);
|
||||
return String.format(
|
||||
"Start-Process -FilePath powershell.exe -ArgumentList \"-NoProfile\", \"-File\", %s",
|
||||
ShellDialects.POWERSHELL.fileArgument(script));
|
||||
"Start-Process -FilePath %s -ArgumentList \"-NoProfile\", \"-File\", %s",
|
||||
pc.getShellDialect().getExecutableName(), pc.getShellDialect().fileArgument(script));
|
||||
}
|
||||
|
||||
if (pc.getOsType().equals(OsType.WINDOWS)) {
|
||||
|
|
|
@ -154,7 +154,7 @@ public class ScriptHelper {
|
|||
var scriptType = parent.getShellDialect();
|
||||
|
||||
// Fix for powershell as there are permission issues when executing a powershell askpass script
|
||||
if (forceExecutable && parent.getShellDialect().equals(ShellDialects.POWERSHELL)) {
|
||||
if (forceExecutable && ShellDialects.isPowershell(parent)) {
|
||||
scriptType = parent.getOsType().equals(OsType.WINDOWS) ? ShellDialects.CMD : ShellDialects.SH;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue