2 Commits

Author SHA1 Message Date
Michael Stapelberg
2c805ed001 refactor cobra command initialization to avoid stale state
Before this commit, we held onto *cobra.Command objects,
but that is not actually supported: after the first Execute(),
commands like updateCmd are stuck on the first-ever provided ctx.

Instead, turn command initialization into functions.

I only noticed this when trying to do two 'gok update'
from within the same test, where the fake build timestamp
is injected via the context (the timestamp was always the same).
2025-11-29 10:47:48 +01:00
Michael Stapelberg
fe8d59ca7d add gok push
related to https://github.com/gokrazy/gokrazy/issues/167
2023-02-19 15:03:41 +01:00