Skip to content

Commit 5953691

Browse files
Appease linter
1 parent 404a009 commit 5953691

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

updater/flasher.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
const GiB = uint64(1024 * 1024 * 1024)
3434
const DownloadDiskSpace = uint64(12)
3535
const ExtractDiskSpace = uint64(10)
36+
const yesPrompt = "yes"
3637

3738
func Flash(ctx context.Context, imagePath *paths.Path, version string, forceYes bool, preserveUser bool, tempDir string) error {
3839
if !imagePath.Exist() {
@@ -62,7 +63,7 @@ func Flash(ctx context.Context, imagePath *paths.Path, version string, forceYes
6263
if err != nil {
6364
return false, err
6465
}
65-
yes := strings.ToLower(yesInput) == "yes" || strings.ToLower(yesInput) == "y"
66+
yes := strings.ToLower(yesInput) == yesPrompt || strings.ToLower(yesInput) == "y"
6667
return yes, nil
6768
}, forceYes, temp)
6869

@@ -117,7 +118,7 @@ func Flash(ctx context.Context, imagePath *paths.Path, version string, forceYes
117118
if err != nil {
118119
return false, err
119120
}
120-
yes := strings.ToLower(yesInput) == "yes" || strings.ToLower(yesInput) == "y"
121+
yes := strings.ToLower(yesInput) == yesPrompt || strings.ToLower(yesInput) == "y"
121122
return yes, nil
122123
}, forceYes, preserveUser)
123124
}
@@ -188,7 +189,7 @@ func FlashBoard(ctx context.Context, downloadedImagePath string, version string,
188189
if err != nil {
189190
return false, err
190191
}
191-
yes := strings.ToLower(yesInput) == "yes" || strings.ToLower(yesInput) == "y"
192+
yes := strings.ToLower(yesInput) == yesPrompt || strings.ToLower(yesInput) == "y"
192193
return yes, nil
193194
}(version)
194195
if err != nil {

0 commit comments

Comments
 (0)