Skip to content

Commit

Permalink
Removed unwanted help check
Browse files Browse the repository at this point in the history
  • Loading branch information
samtholiya committed Jan 5, 2025
1 parent 80c4b8a commit ea2732f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ package cmd
import (
"errors"
"fmt"
"os"

"github.com/elewis787/boa"
cc "github.com/ivanpirog/coloredcobra"
"github.com/spf13/cobra"
"github.com/spf13/pflag"

e "github.com/cloudposse/atmos/internal/exec"
"github.com/cloudposse/atmos/internal/tui/templates"
Expand Down Expand Up @@ -71,11 +69,6 @@ func Execute() error {
Flags: cc.Bold,
})

// Check if the `help` flag is passed and print a styled Atmos logo to the terminal before printing the help
err := RootCmd.ParseFlags(os.Args)
if err != nil && !errors.Is(err, pflag.ErrHelp) {
u.LogErrorAndExit(atmosConfig, err)
}
// InitCliConfig finds and merges CLI configurations in the following order:
// system dir, home dir, current dir, ENV vars, command-line arguments
// Here we need the custom commands from the config
Expand All @@ -88,7 +81,7 @@ func Execute() error {
u.LogErrorAndExit(schema.AtmosConfiguration{}, initErr)
}
}

var err error
// If CLI configuration was found, process its custom commands and command aliases
if initErr == nil {
err = processCustomCommands(atmosConfig, atmosConfig.Commands, RootCmd, true)
Expand Down

0 comments on commit ea2732f

Please sign in to comment.