Skip to content

Commit

Permalink
Merge pull request #351 from fujiwara/fix/v2-diff-at-first
Browse files Browse the repository at this point in the history
fix failed to diff when a remote function is not found.
  • Loading branch information
fujiwara authored Feb 1, 2024
2 parents 7396d94 + 636d0e7 commit 2c57e8c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lambroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (app *App) loadFunction(path string) (*Function, error) {

func newFunctionFrom(c *types.FunctionConfiguration, code *types.FunctionCodeLocation, tags Tags) *Function {
if c == nil {
return &Function{}
return nil
}
fn := &Function{
Architectures: c.Architectures,
Expand Down Expand Up @@ -319,6 +319,9 @@ func newFunctionFrom(c *types.FunctionConfiguration, code *types.FunctionCodeLoc
}

func fillDefaultValues(fn *Function) {
if fn == nil {
return
}
if len(fn.Architectures) == 0 {
fn.Architectures = []types.Architecture{types.ArchitectureX8664}
}
Expand Down

0 comments on commit 2c57e8c

Please # to comment.