Open lgarron opened 2 years ago
Okay, I tried replacing /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist
with an edited version in the recovery mode terminal and failed. :-/
After restarting:
Editing /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist
in XCode with SIP disabled:
Trying to make the system partition readable:
> sudo mount -uw /
mount_apfs: volume could not be mounted: Permission denied
mount: / failed with 66
From https://developer.apple.com/forums/thread/649832?answerId=613554022#613554022
Why do you need to modify the root volume? Given the read-only system volume change we announced last year, and its further evolution this year, that’s something best avoided where possible.
My experience is that most of the common use cases for this are covered by synthetic symlinks (see the synthetic.conf man page). Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = "eskimo" + "1" + "@apple.com"
That thread also mentions sudo bless
, which might be handy.
That thread also implies that changes to /System/Library
are more difficult (read: impossible?) than changes to /Library
, but unfortunately the required change is in the former.
Given https://github.com/sbarex/SourceCodeSyntaxHighlight#file-format-management , I think the only remotely practical way forward would be a campaign to convince Apple to allow .ts
(and .mts
) like they allowed .plist
and .xml
in recent versions:
MacOS 10.15 Catalina does not allow to manage some file formats including (but not limited to): .xml, .plist, .html, .ts, .dart, .txt, common images (.jpg, .gif, .png), …
On macOS 11 Big Sur, the system allows you to manage these previously unauthorized extensions: .plist.
On macOS 12 Monterey, the system allows you to manage these previously unauthorized extensions: .xml.
Upgrading this to severe, because:
macOS still considers
.ts
files to be movie files. This has been hardcoded deeper and deeper into the OS over time, resulting in the following:.ts
files as text files.There are workarounds, but at this point I believe they involve
csrutil disable
(to disable system integrity protection (SIP)) and hacking a QuickTime Player.plist
to remove.ts
. Possibly after every OS update.As someone whose primary programming language is TypeScript, I might be willing to jump through those hoops, but the workarounds are not reasonable for the average programmer. And even I haven't successfully gotten it working yet.
Some references (none of which offer a complete, working solution):