Change user name query

This commit is contained in:
crschnick 2023-12-04 23:00:05 +00:00
parent c2e5e0fa0d
commit efe75a7332
2 changed files with 2 additions and 2 deletions

View file

@ -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() {

View file

@ -137,7 +137,7 @@ public interface ShellDialect {
String getPrintVariableCommand(String name);
String getUsernameVariableName();
CommandControl printUsernameCommand(ShellControl shellControl);
String getPrintExitCodeCommand(String prefix, String suffix);