Skip to content

Commit

Permalink
Handle Windows drive letter in Mix runtime path in the CLI (#1242)
Browse files Browse the repository at this point in the history
jonatanklosko authored Jun 24, 2022
1 parent dbaf1d5 commit 60e4411
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/livebook/config.ex
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 60e4411

Please sign in to comment.