Skip to content

Commit 8cdfbcf

Browse files
simply accept --shared without arguments
1 parent 68b413d commit 8cdfbcf

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The tunnel comes with various options:
6161
|-p,--hubport <HUBPORT>|Use this if you want to connect to port 80 on our hub instead of the default port 4444|
6262
|--pac <arg>|Proxy autoconfiguration. Should be a http(s) URL|
6363
|-q,--nocache|Bypass our Caching Proxy running on our tunnel VM.|
64-
|-s,--shared <all>|Share this tunnel among team members. Valid values: all|
64+
|-s,--shared|Share this tunnel among team members.|
6565
|-v,--version|Displays the current version of the Tunnel|
6666
|-w,--web <directory>|Point to a directory for testing. Creates a local webserver.|
6767
|-x,--noproxy|Do not start a local proxy (requires user provided proxy server on port 8087)|

src/main/java/com/testingbot/tunnel/App.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ public static void main(String... args) throws Exception {
161161
options.addOption("b", "nobump", false, "Do not perform SSL bumping.");
162162
options.addOption("j", "localproxy", true, "The port to launch the local proxy on (default 8087)");
163163

164-
Option shared = new Option("s", "shared", true, "Share this tunnel among team members. Valid values: all");
165-
shared.setArgName("all");
166-
options.addOption(shared);
164+
options.addOption("s", "shared", false, "Share this tunnel among team members.");
167165
options.addOption(null, "doctor", false, "Perform checks to detect possible misconfiguration or problems.");
168166
options.addOption("v", "version", false, "Displays the current version of this program");
169167

@@ -328,10 +326,6 @@ public static void main(String... args) throws Exception {
328326
}
329327

330328
if (commandLine.hasOption("shared")) {
331-
String sharedValue = commandLine.getOptionValue("shared");
332-
if (!"all".equalsIgnoreCase(sharedValue)) {
333-
throw new ParseException("Invalid value for --shared. Only 'all' is supported.");
334-
}
335329
Logger.getLogger(App.class.getName()).log(Level.INFO, "Tunnel will be shared among team members.");
336330
app.shared = true;
337331
}

0 commit comments

Comments
 (0)