Bug
When outputDirectory is set to ./specs in specs.config.yaml and that path already exists as a directory (e.g. from a prior --split-components run), running specs generate without --split-components or -o fails with:
Error: Failed to write file: EISDIR: illegal operation on a directory, open '.../specs'
Expected behavior
The CLI should detect the directory conflict and either:
- Append a default filename (e.g.
{outputDirectory}/{alias}.yaml) when the path is a directory
- Provide a clear error message explaining the conflict and suggesting
-o or --split-components
Steps to reproduce
specs init and configure a source
specs fetch && specs scan — select components
specs generate --split-components — creates specs/ directory with per-component files
specs generate — fails with EISDIR
Context
- CLI version: 0.11.0
- The
outputDirectory config value serves dual purpose: as a directory for split modes and as a file path for single-file mode. This ambiguity causes the conflict.
🤖 Generated with Claude Code
Bug
When
outputDirectoryis set to./specsinspecs.config.yamland that path already exists as a directory (e.g. from a prior--split-componentsrun), runningspecs generatewithout--split-componentsor-ofails with:Expected behavior
The CLI should detect the directory conflict and either:
{outputDirectory}/{alias}.yaml) when the path is a directory-oor--split-componentsSteps to reproduce
specs initand configure a sourcespecs fetch && specs scan— select componentsspecs generate --split-components— createsspecs/directory with per-component filesspecs generate— fails with EISDIRContext
outputDirectoryconfig value serves dual purpose: as a directory for split modes and as a file path for single-file mode. This ambiguity causes the conflict.🤖 Generated with Claude Code