File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
convex-cli/src/main/java/convex/cli Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ public String prompt(String message) {
120
120
}
121
121
122
122
public char [] readPassword (String prompt ) {
123
+ if (!isInteractive ()) throw new CLIError ("Can't prompt for password in non-interactive mode: " +prompt );
124
+
123
125
// For some reason using this stops CTRL-C from being subsequently handled :-(
124
126
Console c = System .console ();
125
127
if (c == null ) {
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ public class Constants {
10
10
11
11
public static final String HOSTNAME_REMOTE = "convex.world" ;
12
12
13
- public static final String HOSTNAME_PEER = "localhost" ;
14
13
15
14
public static final String KEYSTORE_FILENAME = convex .core .Constants .DEFAULT_KEYSTORE_FILENAME ;
16
15
@@ -28,6 +27,9 @@ public class Constants {
28
27
29
28
public static final int DEFAULT_PEER_PORT = convex .core .Constants .DEFAULT_PEER_PORT ;
30
29
30
+ public static final String DEFAULT_PEER_HOSTNAME = "localhost" ;
31
+
32
+
31
33
public static final int DEFAULT_VERBOSE_LEVEL = 2 ;
32
34
33
35
}
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public class RemotePeerMixin extends AMixin {
19
19
private Integer port ;
20
20
21
21
@ Option (names ={"--host" },
22
- defaultValue ="${env:CONVEX_HOST:-" +Constants .HOSTNAME_PEER +"}" ,
22
+ defaultValue ="${env:CONVEX_HOST:-" +Constants .DEFAULT_PEER_HOSTNAME +"}" ,
23
23
description ="Hostname for remote peer connection. Can specify with CONVEX_HOST. Defaulting to: ${DEFAULT-VALUE}" )
24
24
private String hostname ;
25
25
@@ -30,7 +30,7 @@ public class RemotePeerMixin extends AMixin {
30
30
*/
31
31
public Convex connect () {
32
32
if (port ==null ) port =convex .core .Constants .DEFAULT_PEER_PORT ;
33
- if (hostname ==null ) hostname =convex .cli .Constants .HOSTNAME_PEER ;
33
+ if (hostname ==null ) hostname =convex .cli .Constants .DEFAULT_PEER_HOSTNAME ;
34
34
InetSocketAddress sa =IPUtils .parseAddress (hostname ,port );
35
35
try {
36
36
Convex c ;
You can’t perform that action at this time.
0 commit comments