Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request #16 from alexkrauss/proper-shell
Browse files Browse the repository at this point in the history
Invoke Tslint without new shell, which used to fail on Unix.
  • Loading branch information
Pablissimo committed Sep 30, 2015
2 parents a29b34f + 3449cc4 commit 44480a2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/java/com/pablissimo/sonar/TsLintExecutorImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ public class TsLintExecutorImpl implements TsLintExecutor {
public String execute(String pathToTsLint, String configFile, String file) {
LOG.info("TsLint executing for " + file);
Command command = Command.create("node");

command
.addArgument("\"" + pathToTsLint + "\" --config \"" + configFile + "\" --format json \"" + file.trim() + "\"");

command.setNewShell(true);
command.addArgument(pathToTsLint);
command.addArgument("--format");
command.addArgument("json");
command.addArgument("--config");
command.addArgument(configFile);
command.addArgument(file.trim());
command.setNewShell(false);

this.stdOut = new StringBuilder();
this.stdErr = new StringBuilder();
Expand Down

0 comments on commit 44480a2

Please sign in to comment.