Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DISABLE_TUNNEL variable #260

Merged
merged 1 commit into from
Sep 20, 2017
Merged

Add DISABLE_TUNNEL variable #260

merged 1 commit into from
Sep 20, 2017

Conversation

bkeepers
Copy link
Contributor

Setting DISABLE_TUNNEL to any value will prevent localtunnel from being set up, even if the development dependency is installed.

Fixes #259
cc @wilhelmklopp

@bkeepers bkeepers requested a review from a team September 20, 2017 11:51
@@ -26,7 +26,7 @@ if (!program.privateKey) {
program.privateKey = findPrivateKey()
}

if (program.tunnel) {
if (program.tunnel && !process.env.DISABLE_TUNNEL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✨

Asking questions for the sake of it, what do you think about changing it to the following? Makes it a little more predicable. Only DISABLE_TUNNEL=true will truly disable it.

if (... && process.env.DISABLE_TUNNEL !== true)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that environment variable would actually be a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, as @wilhelmklopp points out, regardless to what the environment variable is set to, it will be a string, so setting it to anything should evaluate to true.

@bkeepers bkeepers merged commit 6f6db60 into master Sep 20, 2017
@bkeepers bkeepers deleted the disable-tunnel branch September 20, 2017 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants