use of jetbrains.buildServer.ExecResult in project teamcity-powershell by JetBrains.
the class PowerShellServiceUnix method enableExecution.
private static void enableExecution(@NotNull final File filePath) {
final GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setExePath("chmod");
commandLine.addParameter("+x");
commandLine.addParameter(filePath.getName());
commandLine.setWorkDirectory(filePath.getParent());
final ExecResult execResult = SimpleCommandLineProcessRunner.runCommand(commandLine, null);
if (execResult.getExitCode() != 0) {
LOG.warn("Failed to set executable attribute for " + filePath + ": chmod +x exit code is " + execResult.getExitCode());
}
}
Aggregations