wails/v2/pkg
Lea Anthony 718fd92f85
fix(v2): prevent wails init in non-empty directory with -d flag (#4955)
* fix(v2): prevent wails init in non-empty directory with -d flag

When using -d to specify a target directory, wails init now checks if
the directory is non-empty and errors if so. This prevents accidental
data loss (e.g., overwriting .git directories).

Fixes #4940

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(v2): add tests for init non-empty directory check

Add tests to verify:
- Install fails when target directory is non-empty
- Install succeeds when target directory is empty

Also update changelog with the fix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-02-04 21:23:07 +11:00
..
application [chore] lint fixes 2023-11-12 12:30:49 +11:00
assetserver FIX: Address Mac CGO Crash (#3590) 2024-08-20 18:12:56 +10:00
buildassets Fix for webview2 detection 2025-04-12 13:21:37 +10:00
clilogger Releasetest/release workflow (#1869) 2022-09-18 08:55:21 +10:00
commands fix: cross compiling on linux for windows (#4263) 2025-05-19 21:16:10 +10:00
git Fixed an error that occurred when an author name contains a string that is not suitable for JSON (#3638) 2024-07-29 21:34:19 +10:00
logger fix dev mode logging bug (#3972) 2025-01-23 11:12:18 +00:00
mac chore: fix function names in comment (#3383) 2024-04-09 17:19:06 -05:00
menu chore: fix some comments (#3932) 2024-12-06 14:35:46 +11:00
options Update windows.go 2025-11-04 08:41:29 +11:00
runtime feat(v2): add runtime.ResetSignalHandlers() for Linux panic recovery (#4921) 2026-02-02 18:55:57 +11:00
templates fix(v2): prevent wails init in non-empty directory with -d flag (#4955) 2026-02-04 21:23:07 +11:00