Skip to content

Commit c98df75

Browse files
committed
Delete duplicate code
1 parent a65daf7 commit c98df75

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

cmd/export.go

+6-8
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,13 @@ func export(cmd *cobra.Command, args []string) int {
5656
}
5757

5858
if output {
59-
if err := outputConfig(pkgs); err != nil {
60-
print.Err(err)
61-
return 1
62-
}
59+
err = outputConfig(pkgs)
6360
} else {
64-
if err := writeConfigFile(pkgs); err != nil {
65-
print.Err(err)
66-
return 1
67-
}
61+
err = writeConfigFile(pkgs)
62+
}
63+
if err != nil {
64+
print.Err(err)
65+
return 1
6866
}
6967
return 0
7068
}

0 commit comments

Comments
 (0)