mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Use absolute path for test command
This commit is contained in:
parent
02b1d1325c
commit
7872da5e51
3 changed files with 4 additions and 4 deletions
|
@ -127,7 +127,7 @@ public interface KittyTerminalType extends ExternalTerminalType {
|
|||
var socket = getSocket();
|
||||
try (var sc = LocalShell.getShell().start()) {
|
||||
if (sc.executeSimpleBooleanCommand(
|
||||
"test -w " + sc.getShellDialect().fileArgument(socket))) {
|
||||
"/usr/bin/test -w " + sc.getShellDialect().fileArgument(socket))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ public interface KittyTerminalType extends ExternalTerminalType {
|
|||
var socket = getSocket();
|
||||
try (var sc = LocalShell.getShell().start()) {
|
||||
if (sc.executeSimpleBooleanCommand(
|
||||
"test -w " + sc.getShellDialect().fileArgument(socket))) {
|
||||
"/usr/bin/test -w " + sc.getShellDialect().fileArgument(socket))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ShellTemp {
|
|||
}
|
||||
|
||||
var d = proc.getShellDialect();
|
||||
return proc.executeSimpleBooleanCommand("test -r %s && test -w %s && test -x %s"
|
||||
return proc.executeSimpleBooleanCommand("/usr/bin/test -r %s && /usr/bin/test -w %s && /usr/bin/test -x %s"
|
||||
.formatted(d.fileArgument(dir), d.fileArgument(dir), d.fileArgument(dir)));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public interface ElevationFunction {
|
|||
return false;
|
||||
}
|
||||
|
||||
var isRoot = shellControl.executeSimpleBooleanCommand("test \"${EUID:-$(id -u)}\" -eq 0");
|
||||
var isRoot = shellControl.executeSimpleBooleanCommand("/usr/bin/test \"${EUID:-$(id -u)}\" -eq 0");
|
||||
if (isRoot) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue