Better OS checks

This commit is contained in:
AlexSSD7 2023-09-02 11:28:23 +01:00
commit 58039acc3c
9 changed files with 48 additions and 29 deletions

View file

@ -8,13 +8,13 @@ import (
"os/exec"
"os/signal"
"path/filepath"
"runtime"
"strings"
"sync"
"syscall"
"log/slog"
"github.com/AlexSSD7/linsk/osspecifics"
"github.com/AlexSSD7/linsk/utils"
"github.com/AlexSSD7/linsk/vm"
"github.com/alessio/shellescape"
@ -76,7 +76,7 @@ func createQEMUImg(outPath string) error {
outPath = filepath.Clean(outPath)
baseCmd := "qemu-img"
if runtime.GOOS == "windows" {
if osspecifics.IsWindows() {
baseCmd += ".exe"
}