From c034a2d8e75bf0fc29f1d196da87635651f60f19 Mon Sep 17 00:00:00 2001 From: itzaname Date: Fri, 27 Oct 2023 13:16:45 -0400 Subject: [PATCH] Prefer cmd arg over env --- cmd/rbxcompiler/rbxcompiler.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cmd/rbxcompiler/rbxcompiler.go b/cmd/rbxcompiler/rbxcompiler.go index ebc2029..60a6590 100644 --- a/cmd/rbxcompiler/rbxcompiler.go +++ b/cmd/rbxcompiler/rbxcompiler.go @@ -50,20 +50,13 @@ func build() { if *doUpload { rbxcookie := os.Getenv("RBXCOOKIE") - if rbxcookie == "" { - if cookieFile == nil { - fmt.Printf("No credentials provided\n") - os.Exit(1) - return - } - + if *cookieFile != "" { data, err := os.ReadFile(*cookieFile) if err != nil { fmt.Printf("Failed read cookie file: %s\n", err) os.Exit(1) return } - rbxcookie = strings.Replace(string(data), "\n", "", -1) }