| 290 | return (result.exit_code, stdout, stderr) |
| 291 | |
| 292 | def validate(self, config: dict[str, Any]) -> list[str]: |
| 293 | errors = super().validate(config) |
| 294 | script = config.get("script") |
| 295 | if script is not None and not isinstance(script, str): |
| 296 | errors.append( |
| 297 | f"Init step {config.get('id', '?')!r}: 'script' must be a string " |
| 298 | f"({' or '.join(repr(s) for s in VALID_SCRIPT_TYPES)})." |
| 299 | ) |
| 300 | elif ( |
| 301 | isinstance(script, str) |
| 302 | and "{{" not in script |
| 303 | and script not in VALID_SCRIPT_TYPES |
| 304 | ): |
| 305 | errors.append( |
| 306 | f"Init step {config.get('id', '?')!r}: 'script' must be " |
| 307 | f"{' or '.join(repr(s) for s in VALID_SCRIPT_TYPES)}." |
| 308 | ) |
| 309 | return errors |