This repository was archived by the owner on Jan 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ ```release-note:bug
2+ core: Fix panic if no Use stanza found for given workspace scope on a build,
3+ deploy, release, or registry stanza.
4+ ```
Original file line number Diff line number Diff line change @@ -278,6 +278,8 @@ func (c *App) Release(ctx *hcl.EvalContext) (*Release, error) {
278278func (c * App ) BuildUse (ctx * hcl.EvalContext ) (string , error ) {
279279 if c .BuildRaw == nil {
280280 return "" , nil
281+ } else if c .BuildRaw .Use == nil {
282+ return "" , nil
281283 }
282284
283285 useType := c .BuildRaw .Use .Type
@@ -296,6 +298,8 @@ func (c *App) BuildUse(ctx *hcl.EvalContext) (string, error) {
296298func (c * App ) RegistryUse (ctx * hcl.EvalContext ) (string , error ) {
297299 if c .BuildRaw == nil || c .BuildRaw .Registry == nil {
298300 return "" , nil
301+ } else if c .BuildRaw .Registry .Use == nil {
302+ return "" , nil
299303 }
300304
301305 useType := c .BuildRaw .Registry .Use .Type
@@ -314,6 +318,8 @@ func (c *App) RegistryUse(ctx *hcl.EvalContext) (string, error) {
314318func (c * App ) DeployUse (ctx * hcl.EvalContext ) (string , error ) {
315319 if c .DeployRaw == nil {
316320 return "" , nil
321+ } else if c .DeployRaw .Use == nil {
322+ return "" , nil
317323 }
318324
319325 useType := c .DeployRaw .Use .Type
@@ -332,6 +338,8 @@ func (c *App) DeployUse(ctx *hcl.EvalContext) (string, error) {
332338func (c * App ) ReleaseUse (ctx * hcl.EvalContext ) (string , error ) {
333339 if c .ReleaseRaw == nil {
334340 return "" , nil
341+ } else if c .ReleaseRaw .Use == nil {
342+ return "" , nil
335343 }
336344
337345 useType := c .ReleaseRaw .Use .Type
You can’t perform that action at this time.
0 commit comments