Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Commit 627c534

Browse files
author
Jacob Marble
committed
Don't panic when trying to update a non-existant config file.
1 parent 02a39ee commit 627c534

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gcp-cups-connector-util/gcp-cups-connector-util.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ func updateConfigFile() {
121121
if err != nil {
122122
panic(err)
123123
}
124+
if configFilename == "" {
125+
fmt.Println("Could not find a config file to update")
126+
return
127+
}
124128

125129
// Same config in []byte format.
126130
configRaw, err := ioutil.ReadFile(configFilename)

0 commit comments

Comments
 (0)