fix: Skip config loading and rollup execution for help command

This commit is contained in:
Arik Jones (aider)
2024-09-16 09:52:25 -05:00
parent 41fb9e3fad
commit efee186ae0

View File

@@ -28,6 +28,11 @@ var rootCmd = &cobra.Command{
in a given project, current path or a custom path, to a single timestamped markdown file
whose name is <project-directory-name>-rollup-<timestamp>.md.`,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
// Skip config loading and rollup execution for help command
if cmd.Name() == "help" {
return nil
}
if configFile == "" {
defaultConfig := config.DefaultConfigPath()
if config.FileExists(defaultConfig) {