File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,17 @@ const { Command, Option } = require('commander');
21
21
const { exit } = require ( 'process' ) ;
22
22
const readline = require ( 'readline-sync' ) ;
23
23
24
- function readFromConsole ( question )
24
+ function readFromConsole ( question , isPassword )
25
25
{
26
- var answer = readline . question ( "\x1b[32m" + question + "\x1b[0m" ) ;
26
+ var answer ;
27
+ if ( isPassword !== undefined && isPassword !== null && isPassword == true )
28
+ {
29
+ answer = readline . question ( "\x1b[32m" + question + "\x1b[0m" , { hideEchoBack : true } ) ;
30
+ }
31
+ else
32
+ {
33
+ answer = readline . question ( "\x1b[32m" + question + "\x1b[0m" ) ;
34
+ }
27
35
return answer ;
28
36
}
29
37
@@ -52,7 +60,7 @@ function checkOptions(){
52
60
}
53
61
54
62
if ( program . opts ( ) . password == undefined ) {
55
- tenantPw = readFromConsole ( 'Please type your tenant User Password: ' ) ;
63
+ tenantPw = readFromConsole ( 'Please type your tenant User Password: ' , true ) ;
56
64
}
57
65
else {
58
66
tenantPw = program . opts ( ) . password
You can’t perform that action at this time.
0 commit comments