Skip to content

Commit 5dfb195

Browse files
bug: show error when config.json is malformed
1 parent 252e47f commit 5dfb195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/config/cliconfig.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func ReadCLIConfig(gptscriptConfigFile string) (*CLIConfig, error) {
137137
location: gptscriptConfigFile,
138138
}
139139
if err := json.Unmarshal(data, result); err != nil {
140-
return nil, err
140+
return nil, fmt.Errorf("failed to unmarshal %s: %v", gptscriptConfigFile, err)
141141
}
142142

143143
if result.CredentialsStore == "" {

0 commit comments

Comments
 (0)