please ignore defined but empty ENV['PORT'] #697

Closed
noxqsgit opened this Issue Mar 25, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@noxqsgit

Sinatra recently started using ENV['PORT'] if defined. My setup has a defined but empty $PORT. This results in an Integer parsing error. It would be nice if you could change

set :port, Integer(ENV['PORT'] || 4567)

to e.g.

set :port, Integer(ENV['PORT'] && !ENV['PORT'].empty? ? ENV['PORT'] : 4567)

- Felix

@rkh

This comment has been minimized.

Show comment
Hide comment
@rkh

rkh Mar 25, 2013

Member

This sounds like a good idea. Would you mind turning that into a pull request?

Member

rkh commented Mar 25, 2013

This sounds like a good idea. Would you mind turning that into a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment