strata CLI - Exit Codes
Exit Code Definitions
Code |
Meaning |
Description |
|---|---|---|
0 |
Success |
Operation completed successfully |
1 |
System/Execution Error |
Crashes, missing files, initialization failures, exceptions |
2 |
Usage Error |
Invalid CLI arguments, missing required options (Click handles) |
3 |
Validation Failure |
File processed but contains validation errors |
4 |
Lock Conflict |
Deployment locked by another process (safe to retry) |
Usage by Command
Command |
Exit 0 |
Exit 1 |
Exit 2 |
Exit 3 |
|---|---|---|---|---|
|
✅ |
✅ |
⚠️ Click only |
❌ |
|
✅ |
✅ |
⚠️ Click only |
❌ |
|
✅ |
✅ |
⚠️ Click only |
❌ |
|
✅ |
✅ |
⚠️ Click only |
❌ |
|
✅ |
✅ |
⚠️ Click only |
❌ |
|
✅ |
✅ |
⚠️ Click only |
✅ Schema-invalid file |
|
✅ |
✅ |
⚠️ Click only |
✅ Invalid deployment |
|
✅ |
✅ |
⚠️ Click only |
✅ Invalid deployment |
|
✅ |
✅ |
⚠️ Click only |
✅ Unresolved entries |
|
✅ |
✅ |
⚠️ Click only |
❌ |
Legend: ✅ Used | ⚠️ Automatic | ❌ Not used
Examples
Bash
strata validate config.yaml
if [ $? -eq 3 ]; then
echo "Invalid configuration"
fi
PowerShell
strata validate config.yaml
if ($LASTEXITCODE -eq 3) {
Write-Error "Invalid configuration"
}