diff --git a/assets/cmd.css b/assets/cmd.css new file mode 100644 index 0000000..996d56d --- /dev/null +++ b/assets/cmd.css @@ -0,0 +1,7 @@ +.cmd { + word-wrap: break-word; +} +pre { + background-color: #eee; + min-height: 1.5em; +} diff --git a/index.js b/index.js index 74ae314..4c96c29 100755 --- a/index.js +++ b/index.js @@ -473,7 +473,7 @@ if (shellable) { timeout: 60 * 1000, }, (err, stdout, stderr) => { if (err) { - req.flash("error", "Unable to execute command: " + err); + req.flash("error", "Command failed due to non-zero exit code"); } res.render("cmd", flashify(req, { path: res.filename, diff --git a/views/cmd.handlebars b/views/cmd.handlebars index ea29c4a..0331a55 100644 --- a/views/cmd.handlebars +++ b/views/cmd.handlebars @@ -12,10 +12,11 @@ {{success}} {{/each}} -

{{cmd}}

-
stdout
+

command

+

{{cmd}}

+

stdout

{{stdout}}
-
stderr
+

stderr

{{stderr}}
diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars index e5cfcd9..415824c 100644 --- a/views/layouts/main.handlebars +++ b/views/layouts/main.handlebars @@ -17,6 +17,7 @@ + {{{body}}}