Skip to content

Commit ac7252e

Browse files
committed
fix(offline): surface scaffold failure detail in error output
When --offline scaffold fails, look up the tracker's 'scaffold' step detail and print it alongside the generic error message so users see the specific root cause (e.g. missing zip/pwsh, script stderr).
1 parent ed13813 commit ac7252e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/specify_cli/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,10 +1992,14 @@ def init(
19921992
# --offline explicitly requested: never attempt a network download
19931993
console.print(
19941994
"\n[red]Error:[/red] --offline was specified but scaffolding from bundled assets failed.\n"
1995-
"Check the output above for the specific error.\n"
19961995
"Common causes: missing bash/pwsh, script permission errors, or incomplete wheel.\n"
19971996
"Remove --offline to attempt a GitHub download instead."
19981997
)
1998+
# Surface the specific failure reason from the tracker
1999+
for step in tracker.steps:
2000+
if step["key"] == "scaffold" and step["detail"]:
2001+
console.print(f"[red]Detail:[/red] {step['detail']}")
2002+
break
19992003
# Clean up partial project directory (same as the GitHub-download failure path)
20002004
if not here and project_path.exists():
20012005
shutil.rmtree(project_path)

0 commit comments

Comments
 (0)