httpyac icon indicating copy to clipboard operation
httpyac copied to clipboard

bug: can't specify any file in a directory

Open steebchen opened this issue 4 months ago • 5 comments

I have a folder http with some .http files.

When I run:

> httpyac ./http/reproduction.http --all --output=response
httpYac cannot find the specified file ./http/reproduction.http.

but this works:

> cd http
> httpyac reproduction.http --all --output=response
# ok

this is my file (rename to .http):

reproduction.txt

steebchen avatar Sep 14 '25 00:09 steebchen

huh, super weird. it seems like that's not it, somehow in a repository it keeps saying it can't find the file even though it's there, but it works in a subfolder

Image

steebchen avatar Sep 14 '25 00:09 steebchen

The same for me on Ubuntu; super weird

roll avatar Oct 21 '25 14:10 roll

I use globby to find the file. I always use some kind of *.http for execution. Maybe I need to check the path, and only use globby if it not exists

https://github.com/AnWeber/httpyac/blob/main/src/cli/send/send.ts#L179-L181

AnWeber avatar Oct 22 '25 17:10 AnWeber

Globby omits files that match .gitignore, perhaps that's the case for you as well? We've had a case where httpyac would miss (some) tests if executed from a repo root, but not from a subdir - turns out globby ignores .gitignore entries, but only checks .gitignore from the current directory.

execveat avatar Nov 27 '25 23:11 execveat

Globby omits files that match .gitignore, perhaps that's the case for you as well? We've had a case where httpyac would miss (some) tests if executed from a repo root, but not from a subdir - turns out globby ignores .gitignore entries, but only checks .gitignore from the current directory.

oh yeah that might be it, I do have it gitignore'd in the repo root

steebchen avatar Nov 28 '25 07:11 steebchen