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 skip_browsersync_checks flag on lucky watch #1517

Closed
wants to merge 1 commit into from
Closed

Conversation

jwoertink
Copy link
Member

Purpose

Fixes #1255

Description

On some systems like Alpine Docker, the current browsersync checks may not work. You already have the option to just disable browsersync (removing the --reload-browser flag), but in the case where you still want Lucky to handle browsersync, this new --skip-browsersync-checks flag will skip checking if the port is available.

Eventually, it would be nice to have commands that are fully cross-platform compatible as Crystal gets closer to being fully native on Windows. For now, this is the easy hack around it.

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@matthewmcgarvey matthewmcgarvey left a comment

Choose a reason for hiding this comment

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

I'm hesitant about adding a rather obscure command line flag that disables a small piece of code.

What are your thoughts about documenting that Alpine Linux needs to install lsof? We would just document that they need to run apk add lsof if they want to run lucky in dev mode

@matthewmcgarvey
Copy link
Member

For reference, I googled "alpine linux lsof" and the second result is a stack overflow link where the question is about this and the answer was to just install lsof instead of relying on alpine's. https://stackoverflow.com/questions/54487561/can-lsof-show-open-ports-on-alpine-linux

@jwoertink
Copy link
Member Author

I'm cool with that 👍 I wasn't too keen on this either, but I don't use Alpine, so I don't know anything about it 🤷‍♂️

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.

Alpine Linux support for print_browsersync_port_taken_error
2 participants