🐛 Fixed broken cURL import. Fix #477

This commit is contained in:
Liyas Thomas
2020-01-07 22:40:05 +05:30
parent 1c6f87784b
commit 671fca0736
2 changed files with 17 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ const parseCurlCommand = curlCommand => {
let newlineFound = /\r|\n/.exec(curlCommand);
if (newlineFound) {
// remove newlines
curlCommand = curlCommand.replace(/\\\r|\\\n/g, "");
curlCommand = curlCommand.replace(/\r|\n/g, "");
}
// yargs parses -XPOST as separate arguments. just prescreen for it.
curlCommand = curlCommand.replace(/ -XPOST/, " -X POST");