appbase update: sandbox.flags generator emits broken double-quoting

Open Beginner friendly
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, shell
Domain
cli, tooling

Research direction

Run appbase update in the calendar-sync reproduction and inspect the sandbox.flags output, then trace the update path that migrates flags and the sandbox template. Done means generated flags no longer contain nested double-quotes and the resulting exec nono run command remains correct.

Written by the indexing model from the issue text.

Description

Problem

appbase update migrated existing sandbox flags into sandbox.flags, but the emitted shell has nested double quotes:

APP_FLAGS="$APP_FLAGS --allow "$HOME/.config/calendar-sync""
APP_FLAGS="$APP_FLAGS --allow "$HOME/go""

The inner " closes the outer string. The shell parses this as three concatenated pieces:

  • "$APP_FLAGS --allow " (quoted)
  • $HOME/.config/calendar-sync (unquoted)
  • "" (empty)

It works by accident when $HOME contains no spaces or glob chars, but it's not what was intended.

Suggested fix

Drop the inner quotes entirely:

APP_FLAGS="$APP_FLAGS --allow $HOME/.config/calendar-sync"

The sandbox template uses $APP_FLAGS unquoted in the final exec nono run line, so word-splitting happens there regardless — quoting individual paths inside the accumulator string doesn't survive to the exec. (If paths-with-spaces support is actually desired, the whole APP_FLAGS accumulator pattern needs to become an array, which is a bigger change.)

Repro

In calendar-sync at appbase v0.2.2:

$ appbase update
  updated: ./sandbox regenerated from template (migrated 3 flags to sandbox.flags)
$ cat sandbox.flags
APP_FLAGS="$APP_FLAGS --allow "$HOME/.config/calendar-sync""
...
Dominant language
Go
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from michaelwinser/appbase

All issues in michaelwinser/appbase

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.