Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapfile: command not found under macOS #15

Open
pbek opened this issue Nov 10, 2020 · 2 comments
Open

mapfile: command not found under macOS #15

pbek opened this issue Nov 10, 2020 · 2 comments

Comments

@pbek
Copy link

pbek commented Nov 10, 2020

Under macOS you will get the error mapfile: command not found if you'll try the CSV example to fix the problem with spaces in filenames.

@pbek
Copy link
Author

pbek commented Nov 10, 2020

The problem is that macOS has bash 3 and mapfile was introduced in bash 4.

I found a solution, add this step in front in your workflow:

    - if: contains( matrix.os, 'macos')
      name: Install bash 5.0 under macOS for mapfile
      run: |
        brew install bash
        sudo mv /usr/local/bin/bash /bin/bash

sudo mv /usr/local/bin/bash /bin/bash is needed because you cannot switch the default shell in a GitHub Workflow and you cannot switch the shell of a step to something else than the predefined shells.

@cyqsimon
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants