cicd
path_handling
ai_generated
true
upload-artifact fails — path with spaces not properly quoted in GitHub Actions
ID: cicd/github-actions-space-in-path-artifact
85%Fix Rate
88%Confidence
4Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
GitHub Actions upload-artifact or cache action fails when path contains spaces or special characters.
genericWorkarounds
-
90% success Quote the path and use GitHub Actions expression syntax for dynamic paths
path: "build output/artifacts" # YAML quoted string preserves spaces
-
88% success Rename output directories to avoid spaces in CI workflow
run: mv 'build output' build-output # normalize paths before artifact upload
Dead Ends
Common approaches that don't work:
-
Escape spaces with backslash in YAML
80% fail
YAML backslash escaping is inconsistent; most actions parse paths as plain strings
-
Use shell globbing to match files with spaces
75% fail
Glob patterns in actions/upload-artifact do not handle spaces in directory names