reitzig / sdkman-for-fish

Adds support for SDKMAN! to fish
MIT License
280 stars 13 forks source link

Make compatible with macOS #29

Closed reitzig closed 4 years ago

reitzig commented 4 years ago

Due to differences in default programs, sdkman-for-fish currently doesn't work on macOS. Issues include

We'll need tests and then see what we can do about whatever pops up.

reitzig commented 4 years ago

While the fish 2.7.1 formula exists, curl as called by Travis doesn't find it; Homebrew became homebrew. D'oh? This fails the test with fish 2 right at the start.

reitzig commented 4 years ago

In test/completions.rb, we're getting:

find: -printf: unknown primary or operator

There's another red test:

  Testing 'sdk use ant 1.9.9 > /dev/null; sdk broadcast'
  - sout ok!
  - status ok!
  - path bad:
    7a8
    > /Users/travis/.sdkman/candidates/ant/current/bin
  - anthome bad:
    1c1
    < /Users/travis/.sdkman/candidates/ant/1.9.9
    ---
    > /Users/travis/.sdkman/candidates/ant/current
reitzig commented 4 years ago

One test remains red:

  Testing 'sdk use ant 1.9.9 > /dev/null; sdk broadcast'
  - sout ok!
  - status ok!
  - path bad:
    7a8
    > /Users/travis/.sdkman/candidates/ant/current/bin
  - anthome bad:
    1c1
    < /Users/travis/.sdkman/candidates/ant/1.9.9
    ---
    > /Users/travis/.sdkman/candidates/ant/current

This tastes suspiciously like a reincarnation of #19 -- but only on macOS? Does the workaround maybe not work there?

reitzig commented 4 years ago

Turns out it was exactly that, due to sed behaving differently on macOS.

Seems that was the last of it -- ship it!

PS: Developing for macOS without a Mac ... sucks.