Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File path issue when running locally on Windows #32

Open
MartinSovikEquinor opened this issue Apr 6, 2022 · 9 comments
Open

File path issue when running locally on Windows #32

MartinSovikEquinor opened this issue Apr 6, 2022 · 9 comments

Comments

@MartinSovikEquinor
Copy link

Hi.
The senior developer on my team has set up pre-commit hooks using this utility.
The pre-commit succeeds in github, but when I run it locally, I get an error like this:

$ git commit -m "Line ending fix"
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...............................................................Passed
Check JSON...........................................(no files to check)Skipped
Check Toml...........................................(no files to check)Skipped
Check for added large files..............................................Passed
Check for case conflicts.................................................Passed
Check for broken symlinks............................(no files to check)Skipped

Executable `C:UsersMSOV.cachepre-commitrepo3vt2tuwjpy_env-python3.10Scriptspython.EXE` not found

The exe files exist:

 Directory of C:\Users\MSOV\.cache\pre-commit\repo3vt2tuwj\py_env-python3.10\Scripts

06.04.2022  13:54    <DIR>          .
06.04.2022  13:54    <DIR>          ..
06.04.2022  13:53             2 185 activate
06.04.2022  13:53             1 025 activate.bat
06.04.2022  13:53             3 062 activate.fish
06.04.2022  13:53             1 369 activate.nu
06.04.2022  13:53             1 758 activate.ps1
06.04.2022  13:53             1 193 activate_this.py
06.04.2022  13:53               510 deactivate.bat
06.04.2022  13:53               333 deactivate.nu
06.04.2022  13:53           106 904 pip-3.10.exe
06.04.2022  13:53           106 904 pip.exe
06.04.2022  13:53           106 904 pip3.10.exe
06.04.2022  13:53           106 904 pip3.exe
06.04.2022  13:53                24 pydoc.bat
06.04.2022  13:53           263 056 python.exe
06.04.2022  13:53           251 792 pythonw.exe
06.04.2022  13:53           106 891 wheel-3.10.exe
06.04.2022  13:53           106 891 wheel.exe
06.04.2022  13:53           106 891 wheel3.10.exe
06.04.2022  13:53           106 891 wheel3.exe
06.04.2022  13:54             4 450 yamlfmt
              20 File(s)      1 385 937 bytes
               2 Dir(s)  668 514 533 376 bytes free

but the path seems to have a problem

@csabagabor80
Copy link

csabagabor80 commented May 4, 2022

Hi Martin,

I have the same problem. Did you solve it?

@MartinSovikEquinor
Copy link
Author

Hi. No, I think we just disabled this particular commit hook, sorry.

@daniela-winkler
Copy link

Having the same issue. One possible solution might be using console_scripts instead of scripts (https://stackoverflow.com/questions/73136027/executable-scriptspython-exe-not-found-for-pre-commit-lose-slashes)
I'll submit a PR.

@larskinder
Copy link

Hey @daniela-winkler,
did you create a PR for this issue and manage to fix it?

@spex66
Copy link

spex66 commented Jun 2, 2023

same issue here, would be great to get support for running this pre-commit hook under Windows too

@zachmostowsky
Copy link

+1

@cedric-aebi
Copy link

Still no fix?

@kokorin
Copy link

kokorin commented Aug 22, 2023

The same issue with 0.2.1 and 0.2.3

@alex-ong
Copy link

alex-ong commented Jan 5, 2024

chiming in here, fails on windows for me too. Just needs / instead of \ :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants