Closed runlevelsix closed 9 years ago
I'm at a loss for how to escape passing an argument into the shell command. I'm escaping with single quotes, double quotes, back ticks, backslash, etc and no matter how I pass the url, it always only see 'http' as the parameter.
I'm trying to run a couchapp push command
couchapp push
dbPath = "http://user:pass@localhost:5984/" + clientData.webapp_config.db; grunt.task.run('shell:pushdocs:' + webappPath + ':\''+ dbPath +'\'');
It always returns:
Running "shell:pushdocs:clientbuilds/webapp:'http://user:pass@localhost:5984/ estante-testing'" (shell) task http
My setup for debugging is this:
grunt.initConfig({ shell: { pushdocs: { command: function(webappPath, dbPath) { return 'echo ' + dbPath + '\n'; } } } });
Have I completely missed something about passing this URL in javascript?
Use StackOverflow for support questions ;)
I'm at a loss for how to escape passing an argument into the shell command. I'm escaping with single quotes, double quotes, back ticks, backslash, etc and no matter how I pass the url, it always only see 'http' as the parameter.
I'm trying to run a
couchapp push
commandIt always returns:
My setup for debugging is this:
Have I completely missed something about passing this URL in javascript?