Skip to content

Commit

Permalink
action/debootstrap: make suite property mandatory for debootstrap action
Browse files Browse the repository at this point in the history
Check if suite property is present for debootstarp action and contains
a string. If suite is not present, exit with an error.

Fixes: #238

Signed-off-by: Vignesh Raman <[email protected]>
  • Loading branch information
vigneshraman authored and obbardc committed Aug 4, 2023
1 parent 1ea5f88 commit df4f717
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actions/debootstrap_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func (d *DebootstrapAction) listOptionFiles(context *debos.DebosContext) []strin
}

func (d *DebootstrapAction) Verify(context *debos.DebosContext) error {
if len(d.Suite) == 0 {
return fmt.Errorf("suite property not specified")
}

files := d.listOptionFiles(context)

// Check if all needed files exists
Expand Down

0 comments on commit df4f717

Please sign in to comment.