Skip to content

Warn if bash is not installed #30

@robertmassaioli

Description

@robertmassaioli

Issue description

When bash was not installed, I got this error:

╭─ ~/.zsh-custom/plugins/nix-shell on master✔ 22-01-12 - 10:31:31 [0]
╰─⠠⠵ nix-shell -p myHaskellEnv
/nix/store/1fyqjwakpb5d8h52bwad3inn1r2zndhj-stdenv-darwin/setup: line 20: shopt: inherit_errexit: invalid shell option name
/private/tmp/nix-shell-23306-0/rc: line 1: rm: No such file or directory

I then ran brew install bash and it fixed things:

╭─ ~/.zsh-custom/plugins/nix-shell on master✔ 22-01-12 - 10:31:39 [1]
╰─⠠⠵ brew install bash
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
Updated 1 formula.

==> Downloading https://ghcr.io/v2/homebrew/core/bash/manifests/5.1.16
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/bash/blobs/sha256:85ac02733b659f4a7884395ed2cfd7dbdf59999a0d8a434a0c1a75085009ce2a
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:85ac02733b659f4a7884395ed2cfd7dbdf59999a0d8a434a0c1a75085009ce2a?se=2022-01-11T23%3A40%3A00Z&sig=cGTa65Ck9peapQv9%2FDEs8QMrSWFKGWzkoEXgA2lpW
######################################################################## 100.0%
==> Pouring bash--5.1.16.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/bash/5.1.16: 157 files, 10.9MB
==> Running `brew cleanup bash`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
╭─ ~/.zsh-custom/plugins/nix-shell on master✔ 22-01-12 - 10:32:35 [0]

I highly recommend that a note be added to the readme for this use case. I have not investigated further why this is happening.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions