@@ -224,10 +224,12 @@ type ReleaseConfig struct {
224224func (c * ReleaseConfig ) validate () error {
225225 collector := errs .NewCollector ()
226226
227- // FIXME (etd): Should this check only be run if there is a strategy specified?
228- // otherwise, it feels like this should default to "default".
229- if _ , err := strategies .UpdateStrategyFromString (c .Strategy ); err != nil {
230- collector .Add (fmt .Errorf ("invalid release strategy '%v', should be one of: %v" , c .Strategy , strategies .ListUpdateStrategies ()))
227+ // Only validate the strategy if one is set. If not set, this will use
228+ // the "default" strategy once the update pipeline is run.
229+ if c .Strategy != "" {
230+ if _ , err := strategies .UpdateStrategyFromString (c .Strategy ); err != nil {
231+ collector .Add (fmt .Errorf ("invalid release strategy '%v', should be one of: %v" , c .Strategy , strategies .ListUpdateStrategies ()))
232+ }
231233 }
232234
233235 if collector .HasErrors () {
@@ -301,6 +303,8 @@ func (c *ExtrasConfig) validate() error {
301303
302304 if c .Path != "" && len (c .Updates ) == 0 {
303305 collector .Add (fmt .Errorf ("extras config specifies path but no options for search/replace updates" ))
306+ } else if c .Path == "" && len (c .Updates ) != 0 {
307+ collector .Add (fmt .Errorf ("extras config specifies search/replace options, but no file path" ))
304308 }
305309
306310 for _ , u := range c .Updates {
0 commit comments