Browse Source

Better handling of command line arguments when invoking compiler.

dev/git-series/gccdum
Sahnvour 6 years ago
parent
commit
e80d622ab5
  1. 5
      lib/compile.js
  2. 3
      package.json

5
lib/compile.js

@ -30,7 +30,8 @@ var child_process = require('child_process'),
fs = require('fs-extra'),
Promise = require('promise'),
Queue = require('promise-queue'),
asm = require('./asm');
asm = require('./asm'),
quote = require('shell-quote');
Queue.configure(Promise);
temp.track();
@ -403,7 +404,7 @@ function CompileHandler() {
if (source === undefined) {
return next(new Error("Bad request"));
}
var options = req.body.options.split(' ').filter(identity);
var options = quote.parse(req.body.options).filter(identity);
var filters = req.body.filters;
compileObj.compile(source, compiler, options, filters).then(
function (result) {

3
package.json

@ -30,7 +30,8 @@
"serve-favicon": "2.3.x",
"serve-static": "1.10.x",
"temp": "0.8.x",
"underscore-node": "*"
"underscore-node": "*",
"shell-quote": "1.6.x"
},
"devDependencies": {
"supervisor": "*",

Loading…
Cancel
Save