Add default error case for Runs.Using (#221)
The string comparison in `step_context.go` is currently case sensitive. This commit adds an error that returns the valid options and tells the user what value they passed
This commit is contained in:
parent
a48cce3a78
commit
195a6c9ffb
|
@ -306,8 +306,12 @@ func (sc *StepContext) runAction(actionDir string, actionPath string) common.Exe
|
|||
).Finally(
|
||||
stepContainer.Remove().IfBool(!rc.Config.ReuseContainers),
|
||||
)(ctx)
|
||||
default:
|
||||
return fmt.Errorf(fmt.Sprintf("The runs.using key in action.yml must be one of: %v, got %s", []string{
|
||||
model.ActionRunsUsingDocker,
|
||||
model.ActionRunsUsingNode12,
|
||||
}, action.Runs.Using))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue