mirror of
https://github.com/gopasspw/gopass.git
synced 2026-10-10 19:49:01 +02:00
macOS 27 deprecated the hdiutil disk image interface that hdid(8) wraps. Attaching the ramdisk for a secure tempdir still works, but hdid now prints hdiutil: WARNING: 'hdiutil attach -nomount ...' is deprecated. Please use 'diskutil image attach --noMount ...' instead. to stderr on every call. tempfile passes that stderr straight through, so the warning surfaces in every gopass command that needs a secure tempdir, notably `gopass edit` and `gopass env`. Prefer `diskutil image attach --noMount --nobrowse` and fall back to hdid on releases without the `image` verb. The fallback's stderr is captured rather than passed through, so probing costs no output on older systems, and the outcome is memoized to avoid repeating the failed exec. The two commands format their output differently: hdid pads the device node with spaces and tabs, diskutil emits it bare. Parse with strings.Fields instead of cutting at the first space, which would have kept the trailing newline on diskutil's output. Also correct the ramdisk size comment: 32768 * 512 byte sectors is 16 MiB, not 32 MB. Claude-Session: https://claude.ai/code/session_011xDya1SH2B8fmV7Mx8nDkd Signed-off-by: Parham Alvani <parham.alvani@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>