Search in sources :

Example 1 with ExecResult

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());
    }
}
Also used : GeneralCommandLine(com.intellij.execution.configurations.GeneralCommandLine) ExecResult(jetbrains.buildServer.ExecResult)

Aggregations

GeneralCommandLine (com.intellij.execution.configurations.GeneralCommandLine)1 ExecResult (jetbrains.buildServer.ExecResult)1