You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@echooff:: for /F will launch a new instance of cmd so we create a guard to prevent an infnite loopifnotdefined FNM_AUTORUN_GUARD (
set"FNM_AUTORUN_GUARD=AutorunGuard"FOR /f "tokens=*"%%zIN ('fnm env --use-on-cd') DOCALL%%z
)
安装
下载 fnm
打开 https://github.com/Schniz/fnm/releases,选择
fnm-windows.zip
,下载后解压到任意目录添加环境变量
FNM_DIR
,值为fnm.exe
所在的文件夹, 如D:\fnm
FNM_NODE_DIST_MIRROR
,值https://npmmirror.com/mirrors/node/
%FNM_DIR%
到 PATH 环境变量设置命令行工具
cmd.exe
打开注册表,找到
[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
新建字符串值, 名称
AutoRun
, 值D:\cmd-auto-run\cmd-auto-run.cmd
创建
D:\cmd-auto-run\cmd-auto-run.cmd
文件,输入PowerShell
其他命令行工具参考
https://github.com/Schniz/fnm#shell-setup
Husky
一键命令
node --eval "fs.writeFileSync(path.join(process.env.USERPROFILE, '.huskyrc'), 'eval \"$(fnm env --use-on-cd)\"\n')"
或手动添加
%UserProfile%/.huskyrc
Schniz/fnm#390 (comment)
The text was updated successfully, but these errors were encountered: