Originally posted by **wando777** April 22, 2024
Hello, there 👋
If the path to my staged directory contains spaces, when running any task, despite identifying the path with double quotes, I always get the return of `fatal: pathspec ... did not match any files`.
Here's my `task-runner.json`
```
{
"tasks": [
{
"name": "echo staged files",
"pathMode": "absolute",
"command": "cmd",
"group": "pre-commit",
"args": [
"/c",
"echo",
"${staged}"
]
}
]
}
```
Here's also the output from my console after running `dotnet husky run`
```
[Husky] ? Preparing task 'echo staged files'
[Husky] ? Executing task 'echo staged files' ...
.editorconfig .config/dotnet-tools.json .husky/pre-commit .husky/task-runner.json "src/Private Assemblies/path-to-my-controller/MyController.cs"
fatal: pathspec 'src/Private' did not match any files
[Husky] ? Successfully executed in 45m
```
So, even though it executes dotnet-format, the hook doesn't end up with the modified file in the staged area but the hook stops before that.
Any idea what's going on?
Discussed in https://github.com/alirezanet/Husky.Net/discussions/107