Skip to content

Commit 10fa480

Browse files
committed
[ISSUE#21]: minified added
Signed-off-by: ashish <[email protected]> Signed-off-by: ashish <[email protected]>
1 parent 592d901 commit 10fa480

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/commands/hash.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ export default class Hash extends Command {
3030

3131
//check params after evaluating all
3232
this.checkParameters(flags, args)
33-
let hashedString = this.calculateHash(flags, args)
34-
35-
if (flags.outputFile) { // if output path is provided then write to file also
36-
Utilities.writeStringToFile(this, flags.outputFile, hashedString)
37-
}
33+
this.calculateHash(flags, args)
3834
}
3935

4036
// to check required parameters passed or not
@@ -50,7 +46,10 @@ export default class Hash extends Command {
5046
// @ts-ignore
5147
let hashed: string = hashObject(args.string)
5248
Logger.success(this, `[${flags.type.toUpperCase()}] ${hashed}`)
53-
return hashed
49+
50+
if (flags.outputFile) { // if output path is provided then write to file also
51+
Utilities.writeStringToFile(this, flags.outputFile, hashed)
52+
}
5453
}
5554

5655
// BACKUP function

0 commit comments

Comments
 (0)