Better OS checks
This commit is contained in:
parent
0d3bb647ab
commit
58039acc3c
9 changed files with 48 additions and 29 deletions
|
|
@ -5,9 +5,9 @@ import (
|
|||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/AlexSSD7/linsk/osspecifics"
|
||||
"github.com/AlexSSD7/linsk/share"
|
||||
"github.com/AlexSSD7/linsk/vm"
|
||||
"github.com/sethvargo/go-password/password"
|
||||
|
|
@ -126,10 +126,10 @@ func init() {
|
|||
runCmd.Flags().BoolVar(&debugShellFlag, "debug-shell", false, "Start a VM shell when the network file share is active.")
|
||||
|
||||
var defaultShareType string
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
switch {
|
||||
case osspecifics.IsWindows():
|
||||
defaultShareType = "smb"
|
||||
case "darwin":
|
||||
case osspecifics.IsMacOS():
|
||||
defaultShareType = "afp"
|
||||
default:
|
||||
defaultShareType = "ftp"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue