mirror of
https://github.com/hanzoai/container.git
synced 2026-10-30 15:06:01 +00:00
17 lines
290 B
Go
17 lines
290 B
Go
package util
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
)
|
|
|
|
// AssertQemuImg checks if qemu-img is available.
|
|
func AssertQemuImg() error {
|
|
cmd := "qemu-img"
|
|
if _, err := exec.LookPath(cmd); err != nil {
|
|
return fmt.Errorf("%s not found, run 'brew install %s' to install", cmd, "qemu")
|
|
}
|
|
|
|
return nil
|
|
}
|