-
Notifications
You must be signed in to change notification settings - Fork 327
Conversation
I wonder if there are any commands that check if that project ref is nil, and do some project-agnostic thing if so - maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave this a shot with waypoint status
, waypoint logs
, and waypoint exec
and it works as expected!
I think that this block will never trigger now: Lines 398 to 409 in c962b46
|
Yeah, 'cause we load the config earlier on and fail if it's not there before checking on |
I'm pretty sure this doesn't have weird downstream effects, but I'm 100% sure that we're not depending on refProject being nil to do special project-agnostic behavior somewhere.
@@ -240,6 +240,7 @@ func (c *baseCommand) Init(opts ...Option) error { | |||
match := reAppTarget.FindStringSubmatch(c.args[0]) | |||
if match != nil { | |||
// Set our refs | |||
c.refProject = &pb.Ref_Project{Project: match[1]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, running waypoint exec bin/bash
causes a panic.
Even with this, it's not great behavior, because it parses bin
as the project and bash
as the app, but it's the same behavior as 0.5.2 and we can address it later.
Huh, I wonder when this started happening. I'd be curious to run a bisect and figure out what caused this because this obviously didn't crash at some point. I don't use the |
This started happening after #2413 . So we are fixing a couple of logic pathways from that. Some of the |
Fixes #2523
Also closes #2525; Izaak and I chatted in Slack about preferring this strategy.