mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 15:03:17 +00:00
fix: Remove redeclaration of cfg variable in cmd/root.go
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
configFile string
|
configFile string
|
||||||
cfg *config.Config
|
|
||||||
verbose bool
|
verbose bool
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -19,10 +18,10 @@ Use subcommands to perform specific operations.`,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Execute(conf *config.Config) error {
|
func Execute(conf *config.Config) error {
|
||||||
cfg = conf
|
if conf == nil {
|
||||||
if cfg == nil {
|
conf = &config.Config{} // Use an empty config if none is provided
|
||||||
cfg = &config.Config{} // Use an empty config if none is provided
|
|
||||||
}
|
}
|
||||||
|
cfg = conf // Set the cfg variable in cmd/files.go
|
||||||
return rootCmd.Execute()
|
return rootCmd.Execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user