mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-30 00:21:01 +00:00
Change user name query
This commit is contained in:
@@ -32,7 +32,7 @@ public class OpenFileSystemCache {
|
||||
public void init() throws Exception {
|
||||
ShellControl sc = model.getFileSystem().getShell().get();
|
||||
ShellDialect d = sc.getShellDialect();
|
||||
username = sc.executeSimpleStringCommand(d.getPrintVariableCommand(d.getUsernameVariableName()));
|
||||
username = d.printUsernameCommand(sc).readStdoutOrThrow();
|
||||
}
|
||||
|
||||
public boolean isRoot() {
|
||||
|
||||
@@ -137,7 +137,7 @@ public interface ShellDialect {
|
||||
|
||||
String getPrintVariableCommand(String name);
|
||||
|
||||
String getUsernameVariableName();
|
||||
CommandControl printUsernameCommand(ShellControl shellControl);
|
||||
|
||||
String getPrintExitCodeCommand(String prefix, String suffix);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user