ResolveProject (fnord v0.8.71)

View Source

Project resolution from the current working directory.

Behavior:

  • If inside a git worktree, resolve/1 will map the cwd to the repository root.
  • Select the configured project whose root contains that directory, choosing the one with the deepest (longest) root path.

Returns {:ok, project_name} or {:error, :not_in_project}.

Summary

Types

project_name()

@type project_name() :: binary()

Functions

resolve(cwd \\ nil)

@spec resolve(cwd :: binary() | nil) ::
  {:ok, project_name()} | {:error, :not_in_project}