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

Resolve undefined environment variables to the empty string in the cli. #2024

merged 1 commit into from Oct 11, 2014


Copy link

@jagoda jagoda commented Oct 10, 2014

When using a manifest that references undefined environment variables for port values, the pack fails to start because undefined is not a valid port parameter for a Server. This change causes the cli to treat undefined environment variables as the empty string. In the case where a port value is parsed, this will cause the server to use an ephemeral port.

console.log(' %s, options.key: %s',, options.key);
// Need to wait until the server starts to make sure that the port can
// be bound to successfully.'start', function () {
Copy link

@hueniverse hueniverse Oct 10, 2014

New line after function declaration per style guide

Copy link
Contributor Author

@jagoda jagoda Oct 11, 2014

Oops, sorry about that. Fixed.

Have you considered using a tool like jscs to automate some of this?

@hueniverse hueniverse added the bug label Oct 10, 2014
@hueniverse hueniverse self-assigned this Oct 10, 2014
@jagoda jagoda force-pushed the fix-default-port branch from 593c019 to 830c02b Oct 11, 2014
@hueniverse hueniverse added this to the 7.0.1 milestone Oct 11, 2014
hueniverse pushed a commit that referenced this issue Oct 11, 2014
Resolve undefined environment variables to the empty string in the cli.
@hueniverse hueniverse merged commit 6a31573 into hapijs:master Oct 11, 2014
1 check passed
@jagoda jagoda deleted the fix-default-port branch Oct 13, 2014
Copy link

@lock lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants