Skip to content

install.sh: config saved to temp dir and deleted on exit, setup must be re-run manually #130

@dheerapat

Description

@dheerapat

When running the install script via curl | bash, the auto-run fizzy setup at the end of the script completes successfully and prints ✓ Configuration saved to .fizzy.yaml but the config is immediately deleted. Running fizzy board list afterward returns an AUTH_ERROR. A second manual fizzy setup is required to work correctly.

The install script creates a temp working directory via mktemp -d and registers a trap to delete it on exit:

TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT

The script then cd "$TMPDIR" for the checksum verification step and never changes back. When fizzy setup runs at the end, the current working directory is still $TMPDIR. Since fizzy setup saves config to a relative path (.fizzy.yaml), the config lands inside $TMPDIR, which the trap then deletes when the script exits.

Steps to reproduce

curl -fsSL https://raw.githubusercontent.com/basecamp/fizzy-cli/master/scripts/install.sh | bash
fizzy board list

Setup appears to succeed, but fizzy board list returns:

{"success":false,"error":{"code":"AUTH_ERROR","message":"No API token configured. Run 'fizzy auth login TOKEN' or set FIZZY_TOKEN","status":401}}

fizzy setup should save config to an absolute path (e.g. ~/.fizzy.yaml or ~/.config/fizzy/config.yaml) rather than a relative path.

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