tj / n

Node version management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect cache folder path in show_diagnostics

artemiyokulov opened this issue · comments

Bug Report

https://github.com/tj/n/blob/v9.2.0/bin/n#L1561

Instead local cache_root="${N_PREFIX}/n" needs local cache_root="${N_CACHE_PREFIX}/n"

Summary

Steps to Reproduce

  1. Set N_CACHE_PREFIX=/blabla/any/path
  2. set N_PREFIX=/some/other/folder
  3. run mkdir -p $N_CACHE_PREFIX $N_PREFIX && n doctor

Expected Behaviour

doctor command run successful

Actual Behaviour

get error

Checking permissions for cache folder...
INFO Cache folder does not exist: /usr/local/n

Other Information

Configuration Details

$ n --version

9.2.0

$ command -v node
?

$ node -p process.platform
?

Oops. The directory checks in "doctor" did not get updated when the possible separate cache folder got added in #717

Thanks for report. Fixed in v9.2.1.