Skip to content

Commit 3a9bf44

Browse files
committed
chore(check_for_updates): download release file to parent directory
1 parent f70b159 commit 3a9bf44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/check_for_updates/check_for_updates.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,14 @@ func main() {
227227
}
228228

229229
parentDir := filepath.Dir(currentDir)
230-
downloadDir := filepath.Join(parentDir, "downloads")
231-
if err := os.MkdirAll(downloadDir, 0755); err != nil {
230+
if err := os.MkdirAll(parentDir, 0755); err != nil {
232231
fmt.Printf("%sError creating download directory: %v%s\n", colorRed, err, colorReset)
233232
waitForEnter()
234233
return
235234
}
236235

237236
// Download the release with version in filename
238-
destPath := filepath.Join(downloadDir, fmt.Sprintf("zapret-discord-youtube-ankddev-%s.zip", release.TagName))
237+
destPath := filepath.Join(parentDir, fmt.Sprintf("zapret-discord-youtube-ankddev-%s.zip", release.TagName))
239238
absPath, err := filepath.Abs(destPath)
240239
if err != nil {
241240
fmt.Printf("%sError getting absolute path: %v%s\n", colorRed, err, colorReset)

0 commit comments

Comments
 (0)