-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Add a hugo build
command as an alias for hugo
#6417
Comments
hugo build
command as an alias for hugo
hugo build
command as an alias for hugo
That sounds like an odd thing from Docker -- but it shouldn't cost us too much, and I can imagine other tools that also would like to have the symmetry of "hugo subcommand" for everything. |
Hi! I wished to work on this issue. I was thinking that one way of solving this could be writing a function for the hugoCmd := b.newHugoCmd().getCommand()
return hugoCmd.RunE(cmd, args) The new function could be placed in a new file named Would love thoughts about this approach. |
Given a configuration like this: ENTRYPOINT ["hugo"]
CMD ["--help"] I think it is possible to replace FROM .../hugo
CMD [] On the other side are there Docker images out there where command is not provided and build works as it should. |
@BaibhaVatsa I was hoping that Cobra would handle this via its |
Closing in favor of #11391 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Just a quick thought... It might be helpful to have a
build
command/alias such thathugo build
==hugo
.For example, in a Dockerfile (like the current one) where the default command is
--help
, there doesn't seem to be an easy way to unset that to null and just run plain oldhugo
— the expected behavior is to be able to override the command to something likebuild
at runtime (like we'd do forserver
orversion
). I'm sure there are some other (likely CI/automation related) cases where this might be helpful.To be clear I consider this a limitation with Docker and not Hugo, but I've had this on my wishlist for a while now and I'm curious to hear any thoughts. Apologies for not having enough familiarity to make an actual PR, I poked around in
commands/
for a bit and if others think this is a good idea I can spend some more time, I'm guessing it'd be fairly trivial. Feel free to close this if not, though! :)The text was updated successfully, but these errors were encountered: