Skip to content

create-new-feature.sh --json can fail with '10#Fetching: value too great for base' #1592

@ignatremizov

Description

@ignatremizov

Summary

Running scripts/bash/create-new-feature.sh --json can fail with:

line 250: 10#Fetching: value too great for base (error token is "10#Fetching")

Reproduction

  1. In any git repo, run:
bash /path/to/spec-kit/scripts/bash/create-new-feature.sh --json "Native-like month/year scrolling selector mode"
  1. Observe failure:
.../create-new-feature.sh: line 250: 10#Fetching: value too great for base (error token is "10#Fetching")

Script location

  • scripts/bash/create-new-feature.sh
  • Failing line: FEATURE_NUM=$(printf "%03d" "$((10#$BRANCH_NUMBER))")

Likely cause

BRANCH_NUMBER is populated via command substitution:

BRANCH_NUMBER=$(check_existing_branches "$SPECS_DIR")

Inside check_existing_branches, this runs:

git fetch --all --prune 2>/dev/null || true

If git fetch --all writes status text like Fetching ... to stdout, command substitution captures that output along with the numeric result, so BRANCH_NUMBER can become a non-numeric string (for example Fetching...), which then breaks numeric expansion on line 250.

Suggested fix

Silence both stdout and stderr for fetch (or otherwise ensure check_existing_branches emits only the final integer):

git fetch --all --prune >/dev/null 2>&1 || true

Environment

  • Date observed: 2026-02-11
  • Invocation target repo: /Users/iremizov/code/vue-tailwind-datepicker
  • Script source repo: github/spec-kit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions