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

Handle Windows drive letter in Mix runtime path in the CLI #1242

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

jonatanklosko
Copy link
Member

Closes #1228.

@@ -343,6 +343,15 @@ defmodule Livebook.Config do

defp parse_mix_config!(config) do
case String.split(config, ":", parts: 2) do
# Ignore Windows drive letter
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a unit test to Livebook.Config.default_runtime! that tests this? :)

Copy link
Member Author

@jonatanklosko jonatanklosko Jun 24, 2022

Choose a reason for hiding this comment

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

Actually it's tricky because we check if the path is an actual mix project, which we can't simulate this on linux (i.e. a path with the drive letter), and in case of errors we use System.halt which would make the tests pass. We could raise and do System.halt upstream, but it's not particularly convenient 🤔

@jonatanklosko jonatanklosko merged commit 60e4411 into main Jun 24, 2022
@jonatanklosko jonatanklosko deleted the jk-cli-mix-config-windows branch June 24, 2022 10:49
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.

Issue parsing Mix Standalone path on Windows
2 participants