Skip to content

fix(developer): stop adding a second fnm init to shell rc - #128

Merged
catinspace-au merged 1 commit into
mainfrom
fix/fnm-init-dedupe
Nov 9, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/fnm-init-dedupe

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

The fnm shell-init tasks matched only an eval at the start of a line. An rc with fnm init indented inside an if-block got a second copy. fnm then ran twice per shell and printed "Using Node" twice in any directory with .nvmrc.

  • The lineinfile match allows leading whitespace for both .bashrc (Linux) and .zshrc (macOS).
  • An existing indented init is replaced in place. A copy of that rc layout has one init line after lineinfile.
  • run-tests.sh passes. ansible-lint shows the same 4 key-order findings in nodejs.yml as main.

The fnm shell-init tasks matched only an eval at the start of a line. An rc with the init indented inside an if-block got a second copy. That ran fnm twice per shell and printed "Using Node" twice in a pinned directory.

The match now allows leading whitespace and replaces the existing line in place.
@catinspace-au
catinspace-au merged commit f647801 into main Nov 9, 2026
18 checks passed
@catinspace-au
catinspace-au deleted the fix/fnm-init-dedupe branch November 9, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant