carvel-dev / carvel-dev/kapp-controller

`kctrl package install … --dry-run` logs "Succeeded" to stdout

Open
#1,387 2 comments 0 reactions 0 assignees View on GitHub
bug carvel-accepted
Dominant language
Go
Stars
323
Forks
127
Avg merge
2d 16h
Merged PRs (30d)
4

Description

**What steps did you take:**

I am piping the output of `kctrl package install … --dry-run` into `ytt` (or `kapp`):

```shell
kctrl package install \
… \
--dry-run \
| ytt -f-
```

**What happened:**

```
ytt: Error: Unmarshaling YAML template 'stdin.yml': yaml: line 71: could not find expected ':'
```

That's because `Succeeded` is printed to stdout.

**What did you expect:**

I expected to be able to receive valid YAML on stdout.

**Anything else you would like to add:**

The issue probably is somewhere [around here](https://github.com/carvel-dev/kapp-controller/blob/develop/cli/cmd/kctrl/kctrl.go#L28), but I admit that I was unable to figure out where output directions are configured. It's not obvious.

**Environment:**

```
❯ kctrl --version
kctrl version 0.48.1

Succeeded

❯ bash --version
GNU bash, version 5.2.15(1)-release (x86_64-apple-darwin21.6.0)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

❯ uname -a
Darwin ***** 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64 x86_64

```

---
Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

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.