Skip to content

Commit

Permalink
Make PATH required on config collapse command
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Aug 6, 2018
1 parent 5438129 commit da42356
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func newConfigCommand() *cobra.Command {
}

collapseCommand := &cobra.Command{
Use: "collapse [PATH] (default is \".\")",
Use: "collapse PATH",
Short: "Collapse your CircleCI configuration to a single file",
RunE: collapseConfig,
Args: cobra.MaximumNArgs(1),
Expand Down Expand Up @@ -101,11 +101,7 @@ func expandConfig(cmd *cobra.Command, args []string) error {
}

func collapseConfig(cmd *cobra.Command, args []string) error {
root := "."
if len(args) > 0 {
root = args[0]
}
tree, err := filetree.NewTree(root)
tree, err := filetree.NewTree(args[0])
if err != nil {
return errors.Wrap(err, "An error occurred trying to build the tree")
}
Expand Down

0 comments on commit da42356

Please sign in to comment.