Skip to content

install.sh adds unprotected enable command to .bashrc, causing warnings on source ~/.bashrc #907

Closed

Description

@ravvenox

Description:

When installing Flyline via the install.sh script, the raw command enable -f ${LIB_PATH} flyline is appended directly to ~/.bashrc.

If a user manually reloads their shell configurations later using source ~/.bashrc, Bash throws the following warning because it attempts to re-load an already active dynamic builtin:

bash: enable: warning: flyline: dynamic builtin already loaded

Suggested Fix:

In the installer script, update the ENABLE_CMD line so that it writes a conditional check wrapper into .bashrc instead of a raw command:

ENABLE_CMD=$(cat <<EOF
if ! builtin -f flyline >/dev/null 2>&1; then
    enable -f ${LIB_PATH} flyline 2>/dev/null
fi
EOF
)

Activity

  1. RVC2020 commented on Aug 11, 2026

    @RVC2020

    An even simpler solution.

    ENABLE_CMD='[[ $(type -t flyline) != builtin ]] && enable -f '"$LIB_PATH"' flyline'

    But to be fair, I really don't understand why the install script is executed by sh, since Flyline is for bash.
    It would have gone for . <(curl -sSfL https://github.com/HalFrgrd/flyline/releases/latest/download/install.sh)

    Same shell, directly ask Bash what version it is on. And much easier to write the entire script than using the POXIS shell, where you have to call a bunch of external commands.

  2. ravvenox commented on Aug 12, 2026

    @ravvenox
    ContributorAuthor

    But to be fair, I really don't understand why the install script is executed by sh, since Flyline is for bash. It would have gone for . <(curl -sSfL https://github.com/HalFrgrd/flyline/releases/latest/download/install.sh)

    I guess the dev wanted to make it universally available since Bash is not installed by default on all systems (such as minimal Alpine Linux containers, FreeBSD, or bare-bones macOS instances)

  3. linked a pull request that will close this issueGuarding enable command #914on Aug 13, 2026
  4. HalFrgrd commented on Aug 13, 2026

    @HalFrgrd
    Owner

    Thanks for the tips! Ive updated the installer to use a guard around the enable command and suggesting people run it in bash so that it loads in the current shell.

  5. ravvenox commented on Aug 15, 2026

    @ravvenox
    ContributorAuthor

    Thanks for the tips! Ive updated the installer to use a guard around the enable command and suggesting people run it in bash so that it loads in the current shell.

    Your response to issues is much appreciated.

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