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

Fix Thor.basename method #222

Closed
zzaakiirr opened this issue Aug 1, 2024 · 0 comments · Fixed by #223
Closed

Fix Thor.basename method #222

zzaakiirr opened this issue Aug 1, 2024 · 0 comments · Fixed by #223

Comments

@zzaakiirr
Copy link
Contributor

Looks like it actually comes from Ruby: https://stackoverflow.com/questions/37101151/what-does-file-program-name-mean-in-ruby

I don't think we should modify this variable. And this change only affects the specs, so we're not really testing anything. If anyone were to call the CLI from a file with a different name, they'd get the file name:

myscript

So I'd rather revert this and maybe figure out a way to fix it everywhere in a separate PR. Someone opened an issue about it on Thor a while ago, but it hasn't been touched: rails/thor#742

Maybe we could override basename from Thor to ensure it's always equal to package_name?

Originally posted by @rafaelgomesxyz in #221 (comment)

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

Successfully merging a pull request may close this issue.

1 participant