Repository navigation
Rename main to script name when running scripts - #9948
Conversation
amtoine
left a comment
There was a problem hiding this comment.
i think this is better, thanks @jntrnr
two little things 😋
One potential minor breaking change is that module renames will be shown as their originally defined name rather than the renamed name. I believe this to be a better default.
not sure i get what you mean by that, especially the "originally defined name" 😕
and also do you think we could have a little test for this to make sure a simple script has the right name?
|
@amtoine - I'd add a test, but I think we'd have to add script testing first? I think right now we always test via We should definitely add it, though I'm not sure if it should block this PR. |
i proposed adding a test just to avoid forgetting about it later 😋
either way, i agree this is not a strong blocker 😉 |
|
I'm going to land and file an issue and point at this as motivation for integration tests. we'll need them for main arguments too. |
Description
This PR does three related changes:
mainin the user script to the name of the script.Combined, the above allow the user to see the script name in the help output of scripts, like so:
NOTE: You still declare and call the definition
main, so from inside the scriptmainis still the correct name. But multiple folks agreed that seeingmainin the script help was confusing, so this PR changes that.User-Facing Changes
One potential minor breaking change is that module renames will be shown as their originally defined name rather than the renamed name. I believe this to be a better default.
Tests + Formatting
After Submitting