Skip to content

Commit

Permalink
Add OS conditionally separators on the sql queries
Browse files Browse the repository at this point in the history
  • Loading branch information
coredinate authored Aug 4, 2017
1 parent 04dd070 commit a70cedf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ module.exports = function (grunt) {
});
}


function query_inline(tpl_mysql, inline, silentMode) {
var cmd = tpl_mysql + " -e '" + inline + "'";
var separator = /^win/.test(process.platform) ? '"' : "'";
var cmd = tpl_mysql + " -e "+separator + inline + separator;

if (silentMode == false)
grunt.log.ok(cmd);
shell.exec(cmd, {
Expand Down

0 comments on commit a70cedf

Please sign in to comment.