Fix bug where you weren't able to use both the -q and -j flags at the same time #227

Open
Vylpes wants to merge 11 commits from feature/181-q-json-flags into develop
Showing only changes of commit 3b284484c2 - Show all commits

View file

@ -23,7 +23,8 @@ export default class OutputHelper {
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
private static GetFriendlyObjectText(object: any, output: string, prefix: string = ""): string { private static GetFriendlyObjectText(object: any, output: string, prefix: string = ""): string {
for (const key in object) { for (const key in object) {
Review

I don't think I like the way this is done, I think it should be how it was before, but when its actually printed to the terminal it should remove the appended new line

I don't think I like the way this is done, I think it should be how it was before, but when its actually printed to the terminal it should remove the appended new line
if (typeof(object[key]) == "object") return this.GetFriendlyObjectText(object[key], output, `${key}.`); if (typeof(object[key]) == "object")
return this.GetFriendlyObjectText(object[key], output, `${key}.`);
output += `${prefix}${key} = ${object[key]}\n`; output += `${prefix}${key} = ${object[key]}\n`;
} }
@ -33,7 +34,6 @@ export default class OutputHelper {
private static AppendObject(a: any, b: any, target: string): any { private static AppendObject(a: any, b: any, target: string): any {
a[target] = { ...b }; a[target] = { ...b };
return a;
} }
/* eslint-enable @typescript-eslint/no-explicit-any */ /* eslint-enable @typescript-eslint/no-explicit-any */
} }