garrytan / garrytan/gstack

Conductor gstack template fails on new project creation with build exit code 128

Open
#1,174 11 comments 10 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

## Summary
Creating a new project in Conductor with the `gstack` template fails after cloning the template with:

`Failed to create repo: error: script "build" exited with code 128`

## Repro
1. Open Conductor.
2. Choose the `gstack` template in Quick start.
3. Create a brand-new repo/project.
4. Conductor clones `.claude/skills/gstack` into the new project.
5. The install/build step fails with exit code `128`.

## What I verified
- GitHub auth can succeed and the template clone step completes.
- The failure happens after clone, during the template `build` script.
- `origin/main` currently contains this in `package.json`:

```json
"build": "... && git rev-parse HEAD > browse/dist/.version && git rev-parse HEAD > design/dist/.version && git rev-parse HEAD > make-pdf/dist/.version && ..."
```

## Likely root cause
In a freshly created repo before the first commit exists, `git rev-parse HEAD` exits with code `128`.

That makes the template fail in bootstrapping flows that run before the initial commit is created.

## Suggested fix
Use a fallback when `HEAD` does not exist yet, for example:

```json
(git rev-parse HEAD 2>/dev/null || echo unknown) > browse/dist/.version
(git rev-parse HEAD 2>/dev/null || echo unknown) > design/dist/.version
(git rev-parse HEAD 2>/dev/null || echo unknown) > make-pdf/dist/.version
```

This fixed the local reproduction when testing the template outside an initialized repo with commits.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.