mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 07:19:22 +00:00
ProcessUtil.extraPath now works for non-windows systems.
This commit is contained in:
parent
12023b35df
commit
06fd94374c
@ -154,7 +154,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.3.2</version>
|
||||
<version>3.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
|
||||
@ -180,15 +180,16 @@ public class ProcessUtil {
|
||||
} else {
|
||||
cmd = new String[] { "cmd", "/c", command };
|
||||
}
|
||||
cmd = ArrayUtils.addAll(cmd, args);
|
||||
} else {
|
||||
if (nodeCommands.contains(command)) {
|
||||
cmd = new String[] { getNpmPath(command) };
|
||||
cmd = ArrayUtils.addAll(cmd, args);
|
||||
} else {
|
||||
cmd = new String[] { command };
|
||||
String cmdAndArgs = StringUtils.join(ArrayUtils.insert(0, args, command), " ");
|
||||
cmd = new String[] { "/bin/sh", "-c", cmdAndArgs };
|
||||
}
|
||||
}
|
||||
cmd = ArrayUtils.addAll(cmd, args);
|
||||
|
||||
logger.debug("run command: " + StringUtils.join(cmd, " "));
|
||||
Process[] process = { null };
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user