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
1 changed files with 5 additions and 1 deletions
|
@ -306,8 +306,12 @@ func (sc *StepContext) runAction(actionDir string, actionPath string) common.Exe
|
||||||
).Finally(
|
).Finally(
|
||||||
stepContainer.Remove().IfBool(!rc.Config.ReuseContainers),
|
stepContainer.Remove().IfBool(!rc.Config.ReuseContainers),
|
||||||
)(ctx)
|
)(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 a new issue