mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN)
This was broken in the config rewrite in Hugo 0.112.0. The workaround is to be explicit about setting these flag values (even if just using the defaults), e.g.: ``` hugo deploy --invalidateCDN --maxDeletes 256 ``` Fixes #11127
This commit is contained in:
@@ -127,11 +127,16 @@ func (m *Matcher) Matches(path string) bool {
|
||||
return m.re.MatchString(path)
|
||||
}
|
||||
|
||||
var DefaultConfig = DeployConfig{
|
||||
Workers: 10,
|
||||
InvalidateCDN: true,
|
||||
MaxDeletes: 256,
|
||||
}
|
||||
|
||||
// DecodeConfig creates a config from a given Hugo configuration.
|
||||
func DecodeConfig(cfg config.Provider) (DeployConfig, error) {
|
||||
var (
|
||||
dcfg DeployConfig
|
||||
)
|
||||
|
||||
dcfg := DefaultConfig
|
||||
|
||||
if !cfg.IsSet(deploymentConfigKey) {
|
||||
return dcfg, nil
|
||||
|
Reference in New Issue
Block a user