Skip to content

Commit 67c2fa8

Browse files
committed
[PLUTO-1396] add warning if file does not exist
1 parent 9ddf393 commit 67c2fa8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/update.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ var updateCmd = &cobra.Command{
1919
versionFile := filepath.Join(config.Config.CodacyDirectory(), "version.yaml")
2020
versionData, err := os.ReadFile(versionFile)
2121
if err != nil {
22-
fmt.Printf("Failed to read version.yaml: %v\n", err)
22+
if os.IsNotExist(err) {
23+
fmt.Println("Could not read version file. Make sure you have the latest version of the script")
24+
} else {
25+
fmt.Printf("Failed to read version.yaml: %v\n", err)
26+
}
2327
os.Exit(1)
2428
}
2529

0 commit comments

Comments
 (0)