【问题标题】:How to uninstall pre-commit如何卸载预提交
【发布时间】:2017-11-04 05:00:12
【问题描述】:

按照 Pre-Commit 的 website 上的“非管理安装”说明,我运行了以下命令:

curl http://pre-commit.com/install-local.py | python

这些说明提供以下注释:“(升级:再次运行,卸载:将卸载传递给 python)。

现在,我想卸载预提交。我试图了解如何将卸载传递给 Python。我不确定通过uninstall 意味着什么。

我试过了:

curl http://pre-commit.com/install-local.py | python --uninstall
curl http://pre-commit.com/install-local.py | --uninstall python
curl http://pre-commit.com/install-local.py | uninstall | python

..还有其他一些可能更无意义的变体。所有这些都导致:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Unknown option: -n
usage: /usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
100  2590  100  2590    0     0  14175      0 --:--:-- --:--:-- --:--:-- 14230
(23) Failed writing body

【问题讨论】:

    标签: python uninstallation pre-commit.com


    【解决方案1】:

    这个怎么样:

    curl http://pre-commit.com/install-local.py | python - uninstall
    

    【讨论】:

    • 因此产生了以下注释:Cleaned ~/.pre-commit-venv ~/bin/pre-commit。但是似乎仍然安装了预提交。您能想到的任何原因都会阻止使用上述命令完全卸载它?
    • 不确定,我在我的机器上试过,它似乎删除了它? gist.github.com/madebydavid/1e225ef912984044e02996993b5f269e
    • @kuanb 也许您还运行了pre-commit install,您想通过pre-commit uninstall 撤消? (或者 rm .git/hooks/pre-commit 如果你已经按照上面的方法清除了它)
    猜你喜欢
    • 2021-03-14
    • 2012-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-08
    • 2021-09-23
    • 1970-01-01
    相关资源
    最近更新 更多