问题描述
我需要在我的项目上运行预提交测试,所以我下载了以下 VSCode 扩展: https://marketplace.visualstudio.com/items?itemName=MarkLarah.pre-commit-vscode
它说只是“在 VSCode 命令栏中键入 pre-commit run
”,这给了我:
PS C:\Users\xxx\Documents\VSCode\xxx> pre-commit run
pre-commit : The term 'pre-commit' is not recognized as the name of a cmdlet,function,script file,or operable program. Check the spelling of the name,or if a path was included,verify that the path is correct and try again.
At line:1 char:1
+ pre-commit run
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (pre-commit:String) [],CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
显然我错过了将它集成到我的 Powershell 中的方法?
谢谢!
解决方法
终端窗口与 Visual Studio 命令栏不同。
CTRL-SHIFT-P 将打开命令面板。