Closed EngRajabi closed 10 months ago
Hi @EngRajabi,
I've tested it and it looks fine! at least with the steps you mentioned to reproduce the error:
what did I miss? try to run the command with -v
so it might give you more information. dotnet husky install -v
For testing, I did this process with version 0.5.4 and everything was fine. But with version 0.6.0 I still have problem. Indra.sln file exists in root.
D:\Indra Project>dotnet husky install -v
Checking git path and working directory
failed to execute command 'git'
Command execution failed, see the inner exception for details.
Standard error:
fatal: cannot change to 'D:\Indra': No such file or directory
Could not determine git configuration
I can take a look. from reading the issue i suspect it's around the running git
in a specific directory.
Ah wait a second your path has space in it. That might be the issue i think.
D:\Indra Project>dotnet husky install -v
error says fatal: cannot change to 'D:\Indra': No such file or directory
Yup, confirmed. Issue happens only when the directory name has space.
Good catch, I think this problem is related to these methods where we're sending the path to the git command: https://github.com/alirezanet/Husky.Net/blob/6a64ebed307797f37c8e36c1c4624f7875a88eb5/src/Husky/Services/Git.cs#L111-L115
the ExecBufferedAsync
should receive a list of arguments instead of raw string
working on a fix for those two methods
Hi @EngRajabi,
I released a new version and this should be fixed in v0.6.1
, please let me know if it works for you.
Yes, the problem is solved. Thankful
I don't have this problem in version 0.5.4. That's why I use the old version
Version
0.6.0
Details
add command in root sln directory
error
Steps to reproduce