Skip to content

gstack-config truncates workspace_root paths at the first space #1782

Closed

Description

@jbetala7

Observed problem

gstack-config get reads values with awk '{print $2}', so config values that legitimately contain spaces are truncated. The visible case is workspace_root, which is documented as a user-set directory for /ship sibling worktree scanning.

Repro on current origin/main (ce5fbfa9):

GSTACK_HOME=$(mktemp -d)
bin/gstack-config set workspace_root "/tmp/Conductor Workspaces"
bin/gstack-config get workspace_root

Current output:

/tmp/Conductor

The config file itself contains the full value:

workspace_root: /tmp/Conductor Workspaces

Expected behavior

gstack-config get workspace_root should return the full value after workspace_root:, preserving spaces, so gstack-next-version can scan sibling worktrees under configured roots such as /tmp/Conductor Workspaces or user directories with spaces.

Duplicate searches performed

I searched open and closed issues/PRs for:

  • workspace_root space
  • gstack-config config.yaml space
  • gstack-config workspace_root spaces
  • open PRs touching gstack-config

I did not find an existing issue or canonical PR for this truncation bug.

Candidate fix shape

Replace the awk '{print $2}' config read path with a small helper that strips key: and leading/trailing whitespace while preserving internal spaces. Reuse the helper for both get and the active-values section of list, then add a regression test for a workspace_root value containing spaces.

Activity

  1. jbetala7 commented on May 29, 2026

    @jbetala7
    ContributorAuthor

    Opened PR #1783 with the fix: #1783

  2. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej — recommend closing this issue only after a rebased #1783 lands following get/list checks and spaced-workspace scan checks. #1783 is the implementation path because config reads still truncate workspace roots at the first space. Please retain the spaced-workspace example and downstream-consumer case.

  3. added a commit that references this issue on Aug 15, 2026
    008dd65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions