Skip to content

install.sh: stops at an apt prompt, errors on an existing /usr/games, and fails on reinstall #205

Closed

Description

@dmccoystephenson

install.sh is not safe to run non-interactively or a second time. The following was found by reading the script during the README sweep in #204:

  • Line 1: mkdir /usr/games has no -p. On Debian and Ubuntu, /usr/games usually already exists, so this prints File exists. The script has no set -e, so it carries on, but the error looks like a failure.
  • Line 4: apt-get install git has no -y. If git isn't installed, this stops at a confirmation prompt. If the prompt is declined, the git clone on line 5 fails and /bin/fishe is still written, pointing at a directory that doesn't exist.
  • Line 5: git clone into /usr/games/FishE fails if a previous install is present. The script doesn't point to uninstall.sh or offer a git pull instead.
  • There is no shebang, so it depends on being run as sh install.sh / bash install.sh.

Suggested fix: add #!/bin/sh and set -e, use mkdir -p and apt-get install -y git, and skip the clone (or git -C ... pull) when /usr/games/FishE already exists. tests/test_shellEntryPoints.py shows how to assert a script's contract from Python, since the script itself can't be run in CI.

This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Activity

  1. dmccoystephenson commented on Sep 30, 2026

    @dmccoystephenson
    MemberAuthor

    Resolved in PR #208. This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


    drafted by Claude on behalf of Daniel Stephenson

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions