Skip to content

Commit e1d260b

Browse files
committed
Harden workspace fallback selection
Restrict local path resolution to real workspace checkouts. Keep cli_subprocess_core on an explicit master branch fallback.
1 parent 269e546 commit e1d260b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

mix.exs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ defmodule CodexSdk.MixProject do
8585
defp workspace_dep_specs do
8686
[
8787
{:cli_subprocess_core, "../cli_subprocess_core", @cli_subprocess_core_requirement,
88-
github: @cli_subprocess_core_repo}
88+
github: @cli_subprocess_core_repo, branch: "master"}
8989
]
9090
end
9191

@@ -309,7 +309,7 @@ defmodule CodexSdk.MixProject do
309309
hex_packaging?() ->
310310
{app, requirement, dep_opts}
311311

312-
File.dir?(expanded_path) ->
312+
workspace_checkout?() and File.dir?(expanded_path) ->
313313
{app, Keyword.put(dep_opts, :path, path)}
314314

315315
true ->
@@ -320,4 +320,8 @@ defmodule CodexSdk.MixProject do
320320
defp hex_packaging? do
321321
Enum.any?(System.argv(), &String.starts_with?(&1, "hex."))
322322
end
323+
324+
defp workspace_checkout? do
325+
not Enum.member?(Path.split(Path.expand(__DIR__)), "deps")
326+
end
323327
end

0 commit comments

Comments
 (0)