private static void enableExecution()

in powershell-agent/src/main/java/jetbrains/buildServer/powershell/agent/service/PowerShellServiceUnix.java [95:107]


  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());
    }
  }