Skip to content
Snippets Groups Projects

Enable cross-compatibility in macOS using both native mktemp and coreutils mktemp.

Merged Ricardo Ander-Egg requested to merge polyrand/ghcup:patch-1 into master
1 unresolved thread

Tested on macOS 10.14.6 Mojave running coretuils mktemp version: 8.31

When trying to run the default command the installer throws an error stating there are missing X's in mktemp's template.

#130 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • How do I know this doesn't break another OSX version?

    • Author Contributor

      That's something I also asked myself.

      My guess is that it would be evaluated as a string anyway, the same way "ghcup" alone is evaluated. I'm currently not planning to upgrade to the latest macOS version, so I can't test it with macOS Catalina or with older versions. I made some tests on my computer:

      Using native mktemp:

      /usr/bin/mktemp -d -t ghcup.XXXX creates a folder named: ghcup.XXXX.r2OBbQRF

      /usr/bin/mktemp -d -t ghcupXXXX (without the dot) creates a folder named: ghcupXXXX.wEPBMrGh

      /usr/bin/mktemp -d -t ghcup (the one that runs in macOS without coreutils installed) creates a folder named: ghcup.8fAcY5LC

      Using coreutils (GNU) mktemp v. 8.31:

      mktemp -d -t ghcup.XXXX creates a folder named: ghcup.7Gwj

      mktemp -d -t ghcup.XXXX (without the dot) creates a folder named: ghcup3jJS

      mktemp -d -t ghcup(the one throwing the error) returns: mktemp: too few X's in template ‘ghcup’

    • Please register or sign in to reply
  • merged

Please register or sign in to reply
Loading