Skip to content

Commit

Permalink
fix args handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed Feb 15, 2024
1 parent f8f9832 commit d22df33
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/fmt/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func NewCommand() *cobra.Command {
return &cobra.Command{
Use: "fmt",
Short: "Format a .env file",
Args: cobra.NoArgs,
Args: cobra.ExactArgs(0),
GroupID: "manipulate",
RunE: func(cmd *cobra.Command, args []string) error {
filename := cmd.Flag("file").Value.String()
Expand Down
2 changes: 1 addition & 1 deletion cmd/groups/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func NewCommand() *cobra.Command {
return &cobra.Command{
Use: "groups",
Short: "Print groups found in the .env file",
Args: cobra.NoArgs,
Args: cobra.ExactArgs(0),
GroupID: "output",
RunE: func(cmd *cobra.Command, args []string) error {
filename := cmd.Flag("file").Value.String()
Expand Down
2 changes: 1 addition & 1 deletion cmd/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func NewCommand() *cobra.Command {
return &cobra.Command{
Use: "json",
Short: "Print as JSON",
Args: cobra.NoArgs,
Args: cobra.ExactArgs(0),
GroupID: "output",
RunE: func(cmd *cobra.Command, args []string) error {
filename := cmd.Flag("file").Value.String()
Expand Down
2 changes: 1 addition & 1 deletion cmd/print/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func NewCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "print",
Short: "Print environment variables",
Args: cobra.NoArgs,
Args: cobra.ExactArgs(0),
GroupID: "output",
RunE: runE,
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewCommand() *cobra.Command {
Use: "update",
Short: "Update the .env file from a source",
GroupID: "manipulate",
Args: cobra.NoArgs,
Args: cobra.ExactArgs(0),
RunE: runE,
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewCommand() *cobra.Command {
Use: "validate",
Short: "Validate an .env file",
GroupID: "output",
Args: cobra.NoArgs,
Args: cobra.ExactArgs(0),
RunE: runE,
}

Expand Down

0 comments on commit d22df33

Please sign in to comment.