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

This commit is contained in:
Jonatan Kłosko 2022-06-24 11:49:27 +01:00 committed by GitHub
parent dbaf1d5ea1
commit 60e44115d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
[<<letter>>, rest] when letter in ?a..?z or letter in ?A..?Z ->
[path | rest] = String.split(rest, ":", parts: 2)
[<<letter, ":", path::binary>> | rest]
other ->
other
end
|> case do
[path] -> {path, ""}
[path, flags] -> {path, flags}
end