mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-13 06:23:18 +00:00
fix: Skip config loading and rollup execution for help command
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user