Prefer cmd arg over env

This commit is contained in:
itzaname 2023-10-27 13:16:45 -04:00
parent a8c65122fd
commit c034a2d8e7

View File

@ -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)
}