Skip to content

Add better error message if "target branch" is missing - exit status 128 #330

@colearendt

Description

@colearendt

Is this a request for help?: no


Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

Version of Helm and Kubernetes: helm 3.4.0

What happened:

When running ct list-changed with the default target-branch (master) - if master does not exist (i.e. GitHub now defaults to main), then you get the following in GitHub Actions (via the chart-testing-action):

Error: Error running process: exit status 128

This is very tricky to debug without a dev environment that mirrors the GitHub Action (unfortunately I had a master branch locally so things would not fail locally). Mirroring the GitHub Action environment is not trivial - a bit of logging or a cleaner error would go a long ways to making this easier to debug!

I eventually figured this out by reasoning from this issue: #186

What you expected to happen:

ERROR: `--target-branch=master` does not exist

(Or infer which branch should be referenced from the git repository)

How to reproduce it (as minimally and precisely as possible):

# in a git repo with no master branch
ct list-changed

Anything else we need to know:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions