From 732cd946a3c8c2c6f2e52adad91bd7041b870d95 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 3 Dec 2011 02:50:09 +0000 Subject: [PATCH] * print cmd/args as part of the error message --- .../net/sourceforge/filebot/cli/ScriptShell.lib.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy index b64226f7..e2024b18 100644 --- a/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy +++ b/source/net/sourceforge/filebot/cli/ScriptShell.lib.groovy @@ -44,17 +44,17 @@ List.metaClass.mapByExtension = { mapByExtension(delegate) } import static com.sun.jna.Platform.*; def execute(String... args) { - if (!_args.trustScript) { - _log.severe("Execute failed: Script is not trusted"); - return -1 - } - def cmd = args.toList() if (isWindows()) { // normalize file separator for windows and run with cmd so any executable in PATH will just work cmd = ['cmd', '/c'] + cmd*.replace('/','\\') } + if (!_args.trustScript) { + _log.severe("Execute failed: Script is not trusted: " + cmd) + return -1 + } + // run command and print output def process = cmd.execute() process.waitForProcessOutput(System.out, System.err)