mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 15:03:17 +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
|
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.`,
|
whose name is <project-directory-name>-rollup-<timestamp>.md.`,
|
||||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
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 == "" {
|
if configFile == "" {
|
||||||
defaultConfig := config.DefaultConfigPath()
|
defaultConfig := config.DefaultConfigPath()
|
||||||
if config.FileExists(defaultConfig) {
|
if config.FileExists(defaultConfig) {
|
||||||
|
|||||||
Reference in New Issue
Block a user