Skip to content

Commit 42c2b90

Browse files
committed
[AVRO] - get_schema not prints
Signed-off-by: ashish <ashishpatel0720@gmail.com>
1 parent 51675c8 commit 42c2b90

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/commands/avro.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ export default class Avro extends Command {
5858
let output = type.schema()
5959
let schemaStr = JSON.stringify(output)
6060
// @ts-ignore
61-
Utilities.writeStringToFile(this, flags.output, schemaStr)
61+
Logger.info(this,
62+
`Printing Schema, can find same in ${chalk.yellow(flags.output)}\n${JSON.stringify(output, null, ' ')}`
63+
)
64+
Utilities.writeStringToFile(this , flags.output, schemaStr)
6265
})
6366
}
6467
// tslint:disable-next-line:no-unused

test/commands/avro.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('avro', () => {
3434
expect(ctx.stdout).to.contain('Unsupported Command')
3535
})
3636

37-
// not able to write test, as we are not getting exit(0), as we are not able to catch error using try-catch
37+
/* not able to write test, as we are not getting exit(0), as we are not able to catch error using try-catch */
3838
// test
3939
// .stdout()
4040
// .command(['avro', '-f' ,'test/resources/avro/file_not_exists.avro', '-o', 'output_file.example', 'get_schema'])

0 commit comments

Comments
 (0)