File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ export default class Hash extends Command {
30
30
31
31
//check params after evaluating all
32
32
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 )
38
34
}
39
35
40
36
// to check required parameters passed or not
@@ -50,7 +46,10 @@ export default class Hash extends Command {
50
46
// @ts -ignore
51
47
let hashed : string = hashObject ( args . string )
52
48
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
+ }
54
53
}
55
54
56
55
// BACKUP function
You can’t perform that action at this time.
0 commit comments