Prefer cmd arg over env
This commit is contained in:
parent
a8c65122fd
commit
c034a2d8e7
@ -50,20 +50,13 @@ func build() {
|
|||||||
|
|
||||||
if *doUpload {
|
if *doUpload {
|
||||||
rbxcookie := os.Getenv("RBXCOOKIE")
|
rbxcookie := os.Getenv("RBXCOOKIE")
|
||||||
if rbxcookie == "" {
|
if *cookieFile != "" {
|
||||||
if cookieFile == nil {
|
|
||||||
fmt.Printf("No credentials provided\n")
|
|
||||||
os.Exit(1)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
data, err := os.ReadFile(*cookieFile)
|
data, err := os.ReadFile(*cookieFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Failed read cookie file: %s\n", err)
|
fmt.Printf("Failed read cookie file: %s\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
rbxcookie = strings.Replace(string(data), "\n", "", -1)
|
rbxcookie = strings.Replace(string(data), "\n", "", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user