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