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

new get-port version breaks when using ENV var to set port #164

Open
pixeldrew opened this issue Oct 15, 2024 · 2 comments · May be fixed by #165
Open

new get-port version breaks when using ENV var to set port #164

pixeldrew opened this issue Oct 15, 2024 · 2 comments · May be fixed by #165

Comments

@pixeldrew
Copy link

pixeldrew commented Oct 15, 2024

When setting env var PORT="8080"

New version of get-port expects an integer as an argument and returns an integer instead of a string. So when opts.port is set as an env var the value, it does not get converted to an integer and get-port gives you a different random port.

The way to correct this would be to convert the process.env PORT value to integer before sending it to get-port

@pixeldrew
Copy link
Author

This has broken our build since we didn't pin the sirv-cli version.

@pixeldrew pixeldrew changed the title new get-port version breaks new get-port version breaks when using ENV var Oct 15, 2024
@pixeldrew pixeldrew changed the title new get-port version breaks when using ENV var new get-port version breaks when using ENV var to set port Oct 15, 2024
@pixeldrew pixeldrew linked a pull request Oct 15, 2024 that will close this issue
@pixeldrew
Copy link
Author

@lukeed any chance you can take a look at this?

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 a pull request may close this issue.

1 participant