From df4f717f4d8ad8eb767941df7f0bcde8f698fef4 Mon Sep 17 00:00:00 2001 From: Vignesh Raman Date: Thu, 22 Jul 2021 08:22:20 +0530 Subject: [PATCH] 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 --- actions/debootstrap_action.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/debootstrap_action.go b/actions/debootstrap_action.go index e7bd4006..72504a92 100644 --- a/actions/debootstrap_action.go +++ b/actions/debootstrap_action.go @@ -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