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:
Boris Verkhovskiy
2022-04-24 04:57:03 -07:00
committed by GitHub
parent a29f9bc259
commit 39f01a5a47
23 changed files with 253 additions and 209 deletions

View File

@@ -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";
};