Skip to content

Commit eef705c

Browse files
authored
fix(cli): rename running binary before copy in Windows dogfood tasks (#48)
Windows locks running executables preventing overwrite. The fix renames the running binary to .old first (which Windows allows), then copies the new binary to the original path.
1 parent 9e68689 commit eef705c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rnr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ build:
3333
# Use the task matching your platform, or dogfood-all for all platforms
3434
dogfood-windows-amd64:
3535
description: Build and install to .rnr/bin (Windows x64)
36-
cmd: cargo build --release && copy /Y target\release\rnr.exe .rnr\bin\rnr-windows-amd64.exe
36+
cmd: cargo build --release && ren .rnr\bin\rnr-windows-amd64.exe rnr-windows-amd64.exe.old 2>nul & copy /Y target\release\rnr.exe .rnr\bin\rnr-windows-amd64.exe
3737

3838
dogfood-windows-arm64:
3939
description: Build and install to .rnr/bin (Windows ARM64)
40-
cmd: cargo build --release && copy /Y target\release\rnr.exe .rnr\bin\rnr-windows-arm64.exe
40+
cmd: cargo build --release && ren .rnr\bin\rnr-windows-arm64.exe rnr-windows-arm64.exe.old 2>nul & copy /Y target\release\rnr.exe .rnr\bin\rnr-windows-arm64.exe
4141

4242
dogfood-linux-amd64:
4343
description: Build and install to .rnr/bin (Linux x64)

0 commit comments

Comments
 (0)