default targetos to os.Getenv(GOOS)

This commit is contained in:
idk
2021-12-05 23:20:36 -05:00
parent 934f89b464
commit f78d6987ee

View File

@ -14,7 +14,7 @@ import (
"log" "log"
"os" "os"
"path/filepath" "path/filepath"
"runtime" // "runtime"
"strings" "strings"
"github.com/fuxingZhang/zip" "github.com/fuxingZhang/zip"
@ -82,7 +82,7 @@ func flagsSet() {
cc.CommandInPath = flag.Bool("pathcommand", false, "Wrap a command found in the system $PATH, don't prefix the command with $PLUGIN/lib/") cc.CommandInPath = flag.Bool("pathcommand", false, "Wrap a command found in the system $PATH, don't prefix the command with $PLUGIN/lib/")
executable = *flag.String("exename", "", "Name of the executable the plugin will run, defaults to name") executable = *flag.String("exename", "", "Name of the executable the plugin will run, defaults to name")
resdir = flag.String("res", "", "a directory of additional resources to include in the plugin") resdir = flag.String("res", "", "a directory of additional resources to include in the plugin")
targetos = flag.String("targetos", runtime.GOOS, "Target to run the plugin on") targetos = flag.String("targetos", os.Getenv("GOOS"), "Target to run the plugin on")
noautosuffixwindows = flag.Bool("noautosuffixwindows", false, "Don't automatically add .exe to exename on Windows") noautosuffixwindows = flag.Bool("noautosuffixwindows", false, "Don't automatically add .exe to exename on Windows")
flag.Parse() flag.Parse()
cc.ClientDisplayName = pc.ConsoleLinkName cc.ClientDisplayName = pc.ConsoleLinkName