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

livebook server: Add --open-new flag #529

Merged
merged 4 commits into from
Aug 30, 2021
Merged

livebook server: Add --open-new flag #529

merged 4 commits into from
Aug 30, 2021

Conversation

wojtekmach
Copy link
Contributor

No description provided.

@wojtekmach
Copy link
Contributor Author

It removes one extra step, the click on the "New notebook" button, to get running with Livebook.

wojtekmach and others added 2 commits August 30, 2021 20:37
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

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

Beautiful 🐈

@jonatanklosko jonatanklosko merged commit 01c079a into livebook-dev:main Aug 30, 2021
@josevalim
Copy link
Contributor

I am honestly 👎. The flag only works if you don't have a server already running and I don't think the CLI noise is worth saving one click.

@jonatanklosko
Copy link
Member

The flag only works if you don't have a server already running

So does the --open flag. I can still imagine this being useful if someone uses an alias to start Livebook, though this may be an overoptimisation 🤔

@josevalim
Copy link
Contributor

josevalim commented Aug 30, 2021

Here is an alternative: if the server is already running, we show a readable error message the server is already running (we can either check the port or if there is a node with the same name on the machine), and then we open it anyway. This way someone can use livebook server --open or --open-new multiple times:

$ livebook server --open
Livebook already running. Opening it...

And if there is no open:

$ livebook server
Livebook already running at foo.bar:321.

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.

3 participants