Skip to content

Commit 68759e3

Browse files
committed
[cdt-67] - tslint fixed
Signed-off-by: ashish <[email protected]>
1 parent 9dd5bc8 commit 68759e3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/commands/avro.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,13 @@ export default class Avro extends Command {
4242
if (!flags.file)
4343
Logger.error(this, 'Input file is not provided')
4444

45-
if(args.command)
46-
args.command = args.command
47-
else
45+
if (flags.command) // if -c flag have value, then override
4846
args.command = flags.command
4947

5048
if (!args.command)
5149
Logger.error(this, 'Command is empty or not provided, supported:' + Avro.SupportedCommands)
5250
else // if exists then make Lower Case
53-
args.command= args.command.toLowerCase()
51+
args.command = args.command.toLowerCase()
5452

5553
// output is not mendatory for 'get_schema' command
5654
if (args.command !== Avro.GET_SCHEMA && !flags.output)
@@ -116,15 +114,15 @@ export default class Avro extends Command {
116114
let prependHeader = true // only write on the first line
117115
avro.createFileDecoder(flags.file)
118116
.on('data', function (recordStr) {
119-
// @ts-ignore
117+
// @ts-ignore
120118
let json = JSON.parse(JSON.stringify(recordStr))
121119
Json2Csv.json2csv(json, (err?: Error, csv?: string) => {
122120
if (csv) {
123-
// @ts-ignore
121+
// @ts-ignore
124122
Utilities.appendStringToFile(this, flags.output, csv + '\n')
125123
}
126124
if (err) {
127-
// @ts-ignore
125+
// @ts-ignore
128126
Logger.error(this, err.toString())
129127
}
130128
}, {prependHeader})

0 commit comments

Comments
 (0)