mirror of
https://github.com/curlconverter/curlconverter.git
synced 2022-05-22 02:35:29 +03:00
report Bash parsing errors (#399)
* allow passing warnings list to *Warn() functions that way if there's an error, we can catch the error, look at the warnings that happened while parsing and show them to users.
This commit is contained in:
committed by
GitHub
parent
a29f9bc259
commit
39f01a5a47
@@ -10,7 +10,7 @@ export const fixturesDir = path.resolve(__dirname, "../../test/fixtures");
|
||||
|
||||
// Special case that returns the parsed argument object
|
||||
const toParser = (curl: string | string[]): string => {
|
||||
const [parserOutput, warnings] = utils.parseCurlCommand(curl);
|
||||
const parserOutput = utils.parseCurlCommand(curl);
|
||||
const code = JSON.stringify(parserOutput, null, 2);
|
||||
return code + "\n";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user