Open
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
After I ran yarn config set cache-folder
by mistake, the cache-folder was set true
, and almost any command of yarn crashed.
> yarn config set cache-folder
yarn config v1.22.21
warning package.json: No license field
success Set "cache-folder" to true.
Done in 0.68s.
> yarn cache dir
TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received type boolean (true)
> yarn cache clean
TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received type boolean (true)
> yarn
TypeError [ERR_INVALID_ARG_TYPE]: The "paths[1]" argument must be of type string. Received type boolean (true)
To reproduce
run yarn config set cache-folder
Environment
System:
OS: Windows 11 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
Binaries:
Node: 20.7.0 - C:\Users\SPACET~1\AppData\Local\Temp\xfs-629213ed\node.CMD
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.15.2 - C:\Program Files\nodejs\pnpm.CMD
Additional context
No response