Add Target Folder Parameter to Mise Run

Claude Code·Opus 4.8[1m]·Soph·3mo ago·17min·1 Checkpoint·1 file change·+10/-3·11.4K tokens

can we add a param to "mise run dev:publish" to specifiy the target folder?

3mo ago·2m

Done. mise run dev:publish now takes an optional target folder.

Usage:

  • mise run dev:publish — installs into $GOBIN/~/go/bin as before
  • mise run dev:publish ./some/folder — installs into that folder instead

Changes to mise-tasks/dev/publish:

  • Declared the arg via a #USAGE arg "[target]" line so mise parses it and --help documents it.
  • The target is created (mkdir -p) and resolved to an absolute path (go install rejects a relative GOBIN).
  • Falls back to the original $GOBIN/~/go/bin default when no argument is given.

Both the targeted and default paths are verified working above. (The default now resolves to mise's Go install bin since it sets GOBIN, same as before my change.)

NOTE: we're overriding $GOBIN: /Users/soph/.local/bin

3mo ago·7.0s

That's the new arg working — mise run dev:publish ~/.local/bin resolved the target to /Users/soph/.local/bin and installed entire and git-remote-entire there. 👍

but the export is only in the context of that mise run? or we are setting it in general?

3mo ago·8.3s

Only in the context of that run. The export GOBIN=... lives in the subprocess that runs the script — it's exported so the child go install commands inherit it, but it dies when the task finishes. Your interactive shell's GOBIN is never touched.

Mechanically:

  • mise run dev:publish spawns the script as a child process.
  • export makes the var visible to that script's children (the two go install calls).
  • A child process can't mutate its parent's environment, so nothing persists back to your shell or to future mise runs.

So each invocation is self-contained — the target folder you pass only affects that one install.

so then the logging is not really needed or? it suggests this is a permanent thing

3mo ago·13.8s

Now it just says Installing into: <dir> — accurate and not implying anything permanent.