Files
fleet/orbit/pkg/execuser
Scott Gress d3ed686961 Fix bad Nudge launch command (#28729)
For #28727

## Details

[This
patch](https://github.com/fleetdm/fleet/commit/866d8bcc0073cf7837d60d43eec0b54ad718375f)
was intended to ensure that Fleet Desktop was always run with the
currently-logged-in user. This patch didn't take Nudge into account, and
it is now causing a command like sudo -u /usr/bin/open /path/to/nudge to
execute, which fails.

This PR fixes the issue by checking whether `opts.user` is populated,
and if not, falling back to the previous behavior for opening apps.

## Testing

I tested that Desktop still opens with this, so it at least doesn't
break that. Discussions ongoing re: how to test Nudge.
2025-05-01 16:13:07 -05:00
..