INNER CODE UNIT · Go
applyGlobalOverrides
openrundev/openrun · cmd/openrun/main.go:235
func applyGlobalOverrides(cCtx *cli.Context, globalConfig *types.GlobalConfig, clientConfig *types.ClientConfig, serverConfig *types.ServerConfig) {
if cCtx.IsSet(serverUriFlagName) {
serverUri := cCtx.String(serverUriFlagName)
globalConfig.ServerUri = serverUri
clientConfig.ServerUri = serverUri
serverConfig.ServerUri = serverUri
}
}
// fatalError prints the error to stderr and exits
// fatalError prints the error and exits. A command can choose the exit code
// by returning a cli.ExitCoder (the action commands: 2 for param errors, the
// exit code of a streamed command); an empty message prints nothing, the
// command has reported the failure itself
func fatalError(err error) {
exitCode := 1
var exitErr cli.ExitCoder
if errors.As(err, &exitErr) && exitErr.ExitCode() != 0 {