action/debootstrap: make suite property mandatory for debootstrap action

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 <vignesh.raman@collabora.com>
This commit is contained in:
Vignesh Raman
2021-07-22 08:22:20 +05:30
committed by Christopher Obbard
parent 1ea5f887c8
commit df4f717f4d

View File

@@ -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