Skip to content

Commit 458449a

Browse files
mnriemCopilot
andcommitted
fix: address review feedback — error messages and docs
- Update error messages in common.sh and common.ps1 to reference SPECIFY_FEATURE_DIRECTORY instead of SPECIFY_FEATURE (which no longer resolves feature directories) - Fix get_current_branch comment (returns empty string, not error) - Update upgrade.md to reference SPECIFY_FEATURE_DIRECTORY with correct example paths - Update local-development.md troubleshooting: replace stale 'Git step skipped' row with actionable git extension guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ca7b440 commit 458449a

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

docs/local-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ rm -rf .venv dist build *.egg-info
162162
|---------|-----|
163163
| `ModuleNotFoundError: typer` | Run `uv pip install -e .` |
164164
| Scripts not executable (Linux) | Re-run init or `chmod +x scripts/*.sh` |
165-
| Git step skipped | Git not installed on your system |
165+
| Git commands unavailable | Install the git extension with `specify extension add git` |
166166
| Wrong script type downloaded | Pass `--script sh` or `--script ps` explicitly |
167167
| TLS errors on corporate network | Configure your environment's certificate store or proxy. The `--skip-tls` flag is deprecated and has no effect. |
168168

docs/upgrade.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,18 @@ If you later decide you want the git extension's commands and hooks, install it
278278
specify extension add git
279279
```
280280

281-
Projects that do not use Git can still work with Spec Kit by setting `SPECIFY_FEATURE` manually before planning commands:
281+
Projects that do not use Git can still work with Spec Kit by setting `SPECIFY_FEATURE_DIRECTORY` to the feature directory path before planning commands:
282282

283283
```bash
284284
# Bash/Zsh
285-
export SPECIFY_FEATURE="001-my-feature"
285+
export SPECIFY_FEATURE_DIRECTORY="specs/001-my-feature"
286286

287287
# PowerShell
288-
$env:SPECIFY_FEATURE = "001-my-feature"
288+
$env:SPECIFY_FEATURE_DIRECTORY = "specs/001-my-feature"
289289
```
290290

291+
Alternatively, run the `/speckit.specify` command which creates `.specify/feature.json` automatically.
292+
291293
---
292294

293295
## Troubleshooting

scripts/bash/common.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ get_repo_root() {
4040
}
4141

4242
# Get current feature name from explicit state only.
43-
# Returns the feature identifier or errors if none is set.
43+
# Returns the feature identifier or empty string if none is set.
4444
# Feature state is set by the git extension (via SPECIFY_FEATURE) or by
4545
# the specify command (via .specify/feature.json read in get_feature_paths).
4646
get_current_branch() {
@@ -162,11 +162,11 @@ get_feature_paths() {
162162
# Normalize relative paths to absolute under repo root
163163
[[ "$feature_dir" != /* ]] && feature_dir="$repo_root/$feature_dir"
164164
else
165-
echo "ERROR: Feature directory not found. Set SPECIFY_FEATURE or ensure .specify/feature.json contains feature_directory." >&2
165+
echo "ERROR: Feature directory not found. Set SPECIFY_FEATURE_DIRECTORY or ensure .specify/feature.json contains feature_directory." >&2
166166
return 1
167167
fi
168168
else
169-
echo "ERROR: Feature directory not found. Set SPECIFY_FEATURE or run the specify command to create .specify/feature.json." >&2
169+
echo "ERROR: Feature directory not found. Set SPECIFY_FEATURE_DIRECTORY or run the specify command to create .specify/feature.json." >&2
170170
return 1
171171
fi
172172

scripts/powershell/common.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function Save-FeatureJson {
143143
return
144144
}
145145
} catch {
146-
# File is corrupt or unreadable overwrite it
146+
# File is corrupt or unreadable - overwrite it
147147
}
148148
}
149149

@@ -190,11 +190,11 @@ function Get-FeaturePathsEnv {
190190
$featureDir = Join-Path $repoRoot $featureDir
191191
}
192192
} else {
193-
[Console]::Error.WriteLine("ERROR: Feature directory not found. Set SPECIFY_FEATURE or ensure .specify/feature.json contains feature_directory.")
193+
[Console]::Error.WriteLine("ERROR: Feature directory not found. Set SPECIFY_FEATURE_DIRECTORY or ensure .specify/feature.json contains feature_directory.")
194194
exit 1
195195
}
196196
} else {
197-
[Console]::Error.WriteLine("ERROR: Feature directory not found. Set SPECIFY_FEATURE or run the specify command to create .specify/feature.json.")
197+
[Console]::Error.WriteLine("ERROR: Feature directory not found. Set SPECIFY_FEATURE_DIRECTORY or run the specify command to create .specify/feature.json.")
198198
exit 1
199199
}
200200

0 commit comments

Comments
 (0)