We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0331c05 commit 9fe54c7Copy full SHA for 9fe54c7
1 file changed
packages/cli/src/version/handler.ts
@@ -33,9 +33,15 @@ const workflowVersionHandler = async (
33
logger.error('No workflow available');
34
return;
35
}
36
- const final = Array.from(output.entries())
37
- .map(([key, value]) => key + '\n' + value)
38
- .join('\n\n');
+
+ let final: string;
+ if (options.json) {
39
+ final = JSON.stringify(Object.fromEntries(output), undefined, 2);
40
+ } else {
41
+ final = Array.from(output.entries())
42
+ .map(([key, value]) => key + '\n' + value)
43
+ .join('\n\n');
44
+ }
45
logger.success(`Workflow(s) and their hashes\n\n${final}`);
46
};
47
0 commit comments