github / github/gh-gei

If a migration doesn't run due to invalid (or missing required) parameters exit code is always zero

Open
#1,020 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C#
Stars
478
Forks
146
Avg merge
7d 21h
Merged PRs (30d)
2

Description

## Description

If a migration isn't executed because there are invalid or missing required parameters the exit code is set to zero

This complicates automation of migrations

```shell
$ gh gei migrate-org --dummy
[2023-06-13 11:51:30] [INFO] You are running the latest version of the gei CLI [v0.44]
Option '--github-source-org' is required.
Option '--github-target-org' is required.
Option '--github-target-enterprise' is required.
Unrecognized command or argument '--dummy'.

Description:
Invokes the GitHub APIs to migrate a GitHub org with its teams and the repositories.

Usage:
gh-gei migrate-org [options]
....
$ echo $?
0
```

## Reproduction Steps

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.