The token '&&' is not a valid statement separator in this version

814 阅读1分钟

Win10 系统中 VS Code 中执行 npx husky-init && yarn 报错 The token '&&' is not a valid statement separator in this version.

image.png

原因为 powershell 不支持 && 这种写法,在 Git Bash 中执行就好了, 或者在 powershell 中单步执行命令

image.png