private GeneralCommandLine overwriteSomeParametersIfNeeded(GeneralCommandLine commandLine) { String shellWorkingDir = mongoRunConfiguration.getShellWorkingDir(); if (StringUtils.isNotEmpty(shellWorkingDir)) { commandLine.setWorkDirectory(shellWorkingDir); } String shellParameters = mongoRunConfiguration.getShellParameters(); if (StringUtils.isNotEmpty(shellWorkingDir)) { commandLine.addParameters(shellParameters.split(" ")); } return commandLine; } }
commandLine.setWorkDirectory(shellWorkingDir);
@Nullable public static String readCommandLine(@Nullable final String workingDirectory, @NotNull final String command, @NotNull final String[] params, @Nullable final String input) { final GeneralCommandLine commandLine = new GeneralCommandLine(command); if (workingDirectory != null) { commandLine.setWorkDirectory(workingDirectory); } commandLine.addParameters(params); return readCommandLine(commandLine, input); }
commandLine.setWorkDirectory(workingDirectory); commandLine.setExePath(path); final ParametersList parametersList = commandLine.getParametersList();
commandLine.setWorkDirectory(workDir); commandLine.withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.CONSOLE);
commandLine.setWorkDirectory(workingDirectory); commandLine.setRedirectErrorStream(true); final ParametersList parametersList = commandLine.getParametersList();
commandLine.setWorkDirectory(workingDirectory); commandLine.setExePath(dubPath); final ParametersList parametersList = commandLine.getParametersList();
cmd.setWorkDirectory(workingDirectory); cmd.setExePath(dscannerPath);
commandLine.addParameter(backingFilePath); commandLine.setWorkDirectory(backingFile.getParent().getCanonicalPath());
commandLine.addParameter(backingFilePath); commandLine.setWorkDirectory(backingFile.getParent().getCanonicalPath());