Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c65ac6c

Browse files
committed
fix: delete previous binaries
Keeps the previous behavior which was removing the binary before download.
1 parent afdc641 commit c65ac6c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/kotlin/com/coder/toolbox/cli/CoderCLIManager.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ class CoderCLIManager(
167167
when (conn.responseCode) {
168168
HttpURLConnection.HTTP_OK -> {
169169
logger.info("Downloading binary to $localBinaryPath")
170+
Files.deleteIfExists(localBinaryPath)
170171
Files.createDirectories(localBinaryPath.parent)
171172
val outputStream = Files.newOutputStream(
172173
localBinaryPath,

0 commit comments

Comments
 (0)