mix mob.adopt.mob_exs (mob_dev v0.7.17)

Copy Markdown View Source

Writes mob.exs — project config you commit (plugin activation, trust, styles, and portable mob_dir / elixir_lib defaults) — and ensures .gitignore ignores mob.local.exs, the machine-local override file mob.exs imports last.

Options

  • --local — also write mob.local.exs pointing mob_dir at the local checkout from MOB_DIR (or a sibling-directory fallback). The absolute path never lands in mob.exs, which uses Path.join(File.cwd!(), "deps/mob") and reads MOB_ELIXIR_LIB / :code.lib_dir(:elixir) at runtime.

Other orchestrator flags accepted but inert.

Idempotency

  • An existing mob.exs is not rewritten; it only gains the mob.local.exs import line if it lacks one.
  • mob.local.exs is created with on_exists: :skip.
  • .gitignore patch checks for mob.local.exs before appending.

Typically called by mix mob.adopt, not directly.