Actually print the error instead of hiding it for some reason

This commit is contained in:
itzaname 2021-12-31 17:20:53 -05:00
parent 7b2f6bd4c7
commit cd059b1726

View File

@ -29,13 +29,13 @@ func build() {
if *script {
if err := rbxbuilder.BuildScript(settings); err != nil {
fmt.Println("Failed to build script.")
fmt.Printf("Failed to build script: %s\n", err)
os.Exit(1)
return
}
} else {
if err := rbxbuilder.BuildPlace(settings); err != nil {
fmt.Println("Failed to build place.")
fmt.Printf("Failed to build place: %s\n", err)
os.Exit(1)
return
}
@ -44,7 +44,7 @@ func build() {
if *doUpload {
rbx, err := roblox.New(os.Getenv("RBXCOOKIE"))
if err != nil {
fmt.Println("Failed to start roblox api client.")
fmt.Printf("Failed to start roblox api client: %s\n", err)
os.Exit(1)
return
}
@ -57,7 +57,7 @@ func build() {
Group: *groupId,
}, buffer)
if err != nil {
fmt.Println("Failed to upload place.")
fmt.Printf("Failed to upload place: %s\n", err)
os.Exit(1)
return
}
@ -78,7 +78,7 @@ func generate() {
Source: *input,
Output: *output,
}); err != nil {
fmt.Println("Failed to dump place file to disk.")
fmt.Printf("Failed to dump place file to disk: %s\n", err)
os.Exit(2)
}