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

Issue with -f: not resolving ~ or absolute paths #50

Open
philipsinnott opened this issue Jan 30, 2025 · 0 comments
Open

Issue with -f: not resolving ~ or absolute paths #50

philipsinnott opened this issue Jan 30, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@philipsinnott
Copy link

philipsinnott commented Jan 30, 2025

Hey, I noticed that cook -f: doesn't seem to support ~ or absolute paths. When I try to use -f: ~/wordlists/test.txt or -f: /home/phsi/wordlists/test.txt, it just doesn't process the file. But if I specify the relative path like -f: test.txt or -f: ../wordlists/test.txt, it works fine.

Not a big deal since there's a workaround, but figured I'd report it.

Example:

# just to verify the file exists in both ~/tmp and /wordlists
[phsi@x] ~/tmp
❯ cat test.txt
test
database
lololol
yessir
word

[phsi@x] ~/tmp
❯ cat ~/wordlists/test.txt
test
database
lololol
yessir
word

# works fine when path is relative
[phsi@x] ~/tmp
❯ cook -f: test.txt -start get -end Data / start f.title end
/getTestData
/getDatabaseData
/getLolololData
/getYessirData
/getWordData

# also works fine when traversing paths
[phsi@x] ~/tmp
❯ cook -f: ../wordlists/test.txt -start get -end Data / start f.title end
/getTestData
/getDatabaseData
/getLolololData
/getYessirData
/getWordData

# does not work at all when using ~ or absolute path
[phsi@x] ~/tmp
❯ cook -f: ~/wordlists/test.txt -start get -end Data / start f.title end

[phsi@x] ~/tmp
❯ cook -f: /home/phsi/wordlists/test.txt -start get -end Data / start f.title end
@glitchedgitz glitchedgitz added the bug Something isn't working label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants