问题描述
我对使用 Makefile 为我编写命令还很陌生。
我制作了一个 Makefile 来运行和格式化 Flask 应用程序。 内容是
run:
.\venv\Scripts\python.exe app.py
format:
prettier -w .\templates\
prettier -w .\static\
autopep8 --in-place --aggressive --aggressive .\app.py
make run
按预期工作可能是因为我在同一目录中有虚拟环境。
运行 make format
❯ make format
prettier -w .\templates\
prettier -w .\static\
autopep8 --in-place --aggressive --aggressive .\app.py
[warn] Ignored unkNown option --in-place.
[warn] Ignored unkNown option --aggressive=.\app.py.
[error] No files matching the pattern were found: ".\templatesprettier".
[error] No files matching the pattern were found: ".\staticautopep8".
Makefile:4: recipe for target 'format' Failed
make: *** [format] Error 2
但是手动执行 format
的内容非常好。所以我猜这是 makefile 无法访问这些全局脚本的某种问题?
我将如何解决这个问题,也许有替代方法可以做到这一点(没有 makefile),它更适合我的任务
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)