defenseunicorns / defenseunicorns/uds-cli

uds inspect <bundle> --list-variables prints messages to stdout

Open
#1,127 0 comments 0 reactions 0 assignees View on GitHub
possible-bug
Dominant language
Go
Stars
54
Forks
21
Avg merge
2d 15h
Merged PRs (30d)
45

Description

### Environment

Device and OS: macos 15.4
App version: v0.26.1
Kubernetes distro being used: k3d
Other:

### Steps to reproduce

1. Given a uds bundle file name run: `uds inspect bundle.zst --list-variables --no-color | yq`

### Expected result

It should list the variables as parsed and formatted by yq.

### Actual Result

The horizontal bar and the message `Overrides and Variables: configurable helm overrides and Zarf variables by package` are going to stdout, so the command fails with:

`Error: bad file '-': yaml: line 2: mapping values are not allowed in this context`

### Visual Proof (screenshots, videos, text, etc)

```
uds inspect uds-bundle-msd-stack-amd64-0.0.1.tar.zst --list-variables --no-color | yq
Error: bad file '-': yaml: line 2: mapping values are not allowed in this context
```

### Severity/Priority
Low-ish

### Additional Context

You can work around it by piping to something first to cut the first few lines:

```
uds inspect uds-bundle-msd-stack-amd64-0.0.1.tar.zst --list-variables --no-color | tail -n +4 | yq

artifactory:
variables:
- name: DOMAIN
default: uds.dev
```

The issue seems to be coming from here: https://github.com/defenseunicorns/uds-cli/blob/2a3bf8048526225059802a154e04c12bcb9c4fe1/src/pkg/bundle/inspect.go#L151 which I believe is related to some of the other zarf logging/messaging refactoring that has been in progress.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.