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

Pass different parameters to mktemp on OSX #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mlopes
Copy link

@mlopes mlopes commented Jun 15, 2017

No description provided.

@mlopes
Copy link
Author

mlopes commented Jun 15, 2017

Fixes #3

@mlopes mlopes mentioned this pull request Jun 15, 2017
@nwinkler
Copy link

nwinkler commented Oct 5, 2017

Any updates on getting this merged, @ztombol?

@@ -99,7 +99,13 @@ temp_make() {
template+='-XXXXXXXXXX'

local path
path="$(mktemp --directory --tmpdir="$BATS_TMPDIR" -- "$template" 2>&1)"

if [ "$(uname -s)" == "Darwin" ]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't you want to detect which mktemp rather than the OS?

if mktemp --version >/dev/null 2>&1 ; then
    echo Using GNU mktemp
else
    echo Using BSD mktemp
fi

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to add my remote and implement that change, I currently don't have bats set up on my machine, and given that this PR is been ignored for about 3 months now, I don't think it's worth the effort to try to improve it.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified this works as expected on my mac.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given mac doesn't work at all, could we land this rather than bike shed it?

@peshay
Copy link

peshay commented Sep 22, 2018

@mlopes since it seems this repo is not longer maintained, I started my own fork and working on some changes there: https://github.com/peshay/bats-file/tree/patch-1
I'll also integrate your suggestion from here to use mktemp -d -- "${BATS_TMPDIR}${template}" 2>&1 but I make no difference for Darwin OS or not, because it works for all systems.
Actually still 3 tests fail for me on macOS and I need to further investigate

nwinkler referenced this pull request in rico-chet/bash-it Apr 13, 2020
CaptainQuirk added a commit to CaptainQuirk/bats-file that referenced this pull request Sep 8, 2020
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

Successfully merging this pull request may close these issues.

5 participants