Skip to content

Conversation

mi-bear
Copy link
Contributor

@mi-bear mi-bear commented Jun 13, 2025

Summary

On macOS, this change improves the detection of FAT volumes by parsing diskutil info output to extract the volume name and path. This ensures accurate identification of mounted FAT-based filesystems under /Volumes.

Fixes #4519

Details

  • Replaces hardcoded assumptions about the filesystem layout with dynamic parsing of diskutil info
  • Extracts VolumeName and FileSystemPersonality for each mount point
  • Adds a check for scanner.Err() to handle unexpected parsing issues gracefully
  • Sorts results by volume path for consistent ordering

Platform

  • This change only affects the darwin (macOS) platform
  • No impact on other platforms or existing logic for linux/windows

Copy link
Member

@sago35 sago35 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@deadprogram
Copy link
Member

Thank you for the improvement @mi-bear and to @sago35 & @b0ch3nski for review. Now squash/merging.

@deadprogram deadprogram merged commit 330f8c7 into tinygo-org:dev Jun 14, 2025
31 of 34 checks passed
deadprogram pushed a commit that referenced this pull request Aug 16, 2025
…4928)

* Use diskutil on macOS to extract volume name and path for FAT mounts
* Improve FAT mount detection on macOS by parsing diskutil output into a map
* Simplify conditional check
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.

4 participants