From: Steve Hackbarth Date: Mon, 11 Aug 2014 19:28:59 +0000 (-0400) Subject: issue #24200: make sure we have an output directory X-Git-Tag: v4.7.0-beta.2~63^2 X-Git-Url: http://git.roojs.org/?p=xtuple;a=commitdiff_plain;h=b4ea708ad537e30e37f342fbc8c250457fc64c39 issue #24200: make sure we have an output directory --- diff --git a/scripts/lib/util/send_to_database.js b/scripts/lib/util/send_to_database.js index b064e6456..939f28087 100644 --- a/scripts/lib/util/send_to_database.js +++ b/scripts/lib/util/send_to_database.js @@ -12,6 +12,9 @@ regexp:true, undef:true, strict:true, trailing:true, white:true */ var sendToDatabase = function (query, credsClone, options, callback) { var filename = path.join(__dirname, "../../output/build_" + credsClone.database + ".sql"); + if (!fs.existsSync(path.join(__dirname, "../../output"))) { + fs.mkdirSync(path.join(__dirname, "../../output")); + } fs.writeFile(filename, query, function (err) { if (err) { winston.error("Cannot write query to file");