Skip to content

Commit 214bbb8

Browse files
committed
Moved copy errors to the trace
1 parent 4bdebd5 commit 214bbb8

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

core/src/main/groovy/noe/common/utils/Cmd.groovy

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,23 @@ public class Cmd {
240240
*
241241
* @deprecated args
242242
*/
243-
public static int executeCommand(command, File targetDir, Map args = null, Map tmpProps = null) {
244-
return executeCommandRedirectIO(command, targetDir, null, System.out, System.err, args, tmpProps)
243+
static int executeCommand(command, File targetDir, Map args = null, Map tmpProps = null) {
244+
245+
if (command instanceof String || command instanceof GString) {
246+
if (command.length() > 2 && command[0] == "[" && command[command.length() - 1] == "]") {
247+
command = command[1..command.length() - 2]
248+
}
249+
command = command.tokenize(", ")
250+
}
251+
252+
Map rv = executeCommandConsumeStreams(command as List, targetDir, null, 60000L, tmpProps)
253+
if (!rv.stdOut.isEmpty()) {
254+
log.info(rv.stdOut)
255+
}
256+
if (!rv.stdErr.isEmpty()) {
257+
log.trace(rv.stdErr)
258+
}
259+
return rv.exitValue
245260
}
246261

247262
/**

core/src/main/groovy/noe/server/ServerAbstract.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ abstract class ServerAbstract implements IApp {
3232
//TODO: EWS specific, pls remove.
3333
Boolean ignoreShutdownPort ///
3434
def start ///standard startup command (apachectl start)
35-
def stop ///standard shutdown command (apachectl stop)
35+
String stop ///standard shutdown command (apachectl stop)
3636
String binPath // relative path (server root) to dir where stop handler is stored
3737
List configDirs = [] // relative paths to dir where server config files are stored
3838
List logDirs = [] // relative paths to dir where server logs are stored

0 commit comments

Comments
 (0)