Describe the bug
Two related problems around asdf's environment variable:
-
docs/managers.md is factually wrong. It states asdf detection uses ASDF_DIR. The actual code (internal/detector/asdf.go:27,56-96) deliberately uses ASDF_DATA_DIR instead, with a code comment explicitly explaining that ASDF_DIR points at the asdf source checkout, not the data/install directory, and that using it would be wrong.
-
internal/detector/system_node.go:414-421's classifier is inconsistent with asdf.go's own stated rationale. The "is this node inside a manager's data dir" override check reads ASDF_DIR for asdf — the opposite of what asdf.go says is correct. A user who has only set ASDF_DATA_DIR (the actually-correct variable, per asdf.go's own comment) gets their asdf-managed Node install misclassified by nodeup check/nodeup upgrade's system-node warning, producing a bogus "nodeup does not recognize this install" warning for a perfectly normal asdf setup.
This is a committed, tested inconsistency (system_node_test.go encodes ASDF_DIR as the expected override variable) rather than an accidental typo — but it directly contradicts asdf.go's own two-file-away rationale for why ASDF_DIR is the wrong variable to use.
Suggested fix
- Change
docs/managers.md's asdf row to say ASDF_DATA_DIR (matching the code).
- Change
system_node.go's manager-data-dir override check for asdf to read ASDF_DATA_DIR instead of ASDF_DIR, matching asdf.go's own detection logic, and update system_node_test.go's expectations accordingly.
Severity
Medium — causes real, incorrect warnings for asdf users with a standard setup.
Describe the bug
Two related problems around asdf's environment variable:
docs/managers.mdis factually wrong. It states asdf detection usesASDF_DIR. The actual code (internal/detector/asdf.go:27,56-96) deliberately usesASDF_DATA_DIRinstead, with a code comment explicitly explaining thatASDF_DIRpoints at the asdf source checkout, not the data/install directory, and that using it would be wrong.internal/detector/system_node.go:414-421's classifier is inconsistent with asdf.go's own stated rationale. The "is this node inside a manager's data dir" override check readsASDF_DIRfor asdf — the opposite of whatasdf.gosays is correct. A user who has only setASDF_DATA_DIR(the actually-correct variable, per asdf.go's own comment) gets their asdf-managed Node install misclassified bynodeup check/nodeup upgrade's system-node warning, producing a bogus "nodeup does not recognize this install" warning for a perfectly normal asdf setup.This is a committed, tested inconsistency (
system_node_test.goencodesASDF_DIRas the expected override variable) rather than an accidental typo — but it directly contradictsasdf.go's own two-file-away rationale for whyASDF_DIRis the wrong variable to use.Suggested fix
docs/managers.md's asdf row to sayASDF_DATA_DIR(matching the code).system_node.go's manager-data-dir override check for asdf to readASDF_DATA_DIRinstead ofASDF_DIR, matchingasdf.go's own detection logic, and updatesystem_node_test.go's expectations accordingly.Severity
Medium — causes real, incorrect warnings for asdf users with a standard setup.