Skip to content
Snippets Groups Projects
Unverified Commit d38f65ee authored by Alex Clemmer's avatar Alex Clemmer Committed by GitHub
Browse files

Merge pull request #159 from jessicayuen/diff-segfault

Fix segfault for ks diff
parents 812dfa74 93e8d778
No related branches found
No related tags found
No related merge requests found
......@@ -44,8 +44,11 @@ var diffCmd = &cobra.Command{
Use: "diff [<env1> [<env2>]] [-f <file-or-dir>]",
Short: "Display differences between server and local config, or server and server config",
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("'diff' requires at least one argument, that is the name of the environment\n\n%s", cmd.UsageString())
}
if len(args) > 2 {
return fmt.Errorf("'diff' takes at most two arguments, that are the name of the environments")
return fmt.Errorf("'diff' takes at most two arguments, that are the name of the environments\n\n%s", cmd.UsageString())
}
flags := cmd.Flags()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment