jupyterhub / binderhub

Run your code in the cloud, with technology so advanced, it feels like magic!
https://binderhub.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.57k stars 390 forks source link

pre-commit does not work for this repo if you do not use conda #1690

Closed yuvipanda closed 1 year ago

yuvipanda commented 1 year ago

Bug description

When trying to use pre-commit on a machine with no conda, it does not work. The following exception occurs:

➜ g commit
[INFO] Installing environment for local.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('conda', 'env', 'create', '-p', '/Users/yuvipanda/.cache/pre-commit/repo2xt7fjkj/conda-default', '--file', 'environment.yml')
return code: 1
stdout:
    Executable `conda` not found
stderr: (none)
Check the log at /Users/yuvipanda/.cache/pre-commit/pre-commit.log

The script being run doesn't actually use anything conda specific, should just use whatever python pre-commit is already using.