tart run: do not recommend running "tart run" as root (#1147)

This commit is contained in:
Nikolay Edigaryev 2025-10-08 14:44:05 +02:00 committed by GitHub
parent eff964b62a
commit d762fe6fc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -134,11 +134,12 @@ struct Run: AsyncParsableCommand {
Learn how to create a disk image using Disk Utility here: https://support.apple.com/en-gb/guide/disk-utility/dskutl11888/mac
To work with block devices, the easiest way is to modify their permissions (e.g. by using "sudo chown $USER /dev/diskX") or to run the Tart binary as root, which affects locating Tart VMs.
To work with block devices, the easiest way is to modify their permissions to be accessible to the current user:
To work around this pass TART_HOME explicitly:
sudo chown $USER /dev/diskX
tart run sequoia --disk=/dev/diskX
sudo TART_HOME="$HOME/.tart" tart run sequoia --disk=/dev/disk0
Warning: after running the chown command above, all software running under the current user will be able to access /dev/diskX. If that violates your threat model, we recommend avoiding mounting block devices altogether.
""", valueName: "path[:options]"), completion: .file())
var disk: [String] = []