-
Notifications
You must be signed in to change notification settings - Fork 515
Description
Operating System
Windows
Run Mode
Electron (Desktop App)
App Version
0.13 and earlier
Bug Description
Automaker creates reserved filename "nul" on Windows, blocking Git and OneDrive sync
Summary
Automaker creates a file literally named nul during operation. On Windows, NUL is a reserved device name, which causes Git operations to fail. File is located in below the root project directory.
Environment
- OS: Windows 11
- Automaker Version: 0.13
- Git Version: git version 2.49.0.windows.1
Steps to Reproduce
- Run Automaker on a Windows system
- Let Automaker process features/events
- Attempt to stage files with
git add -A -- .
Expected Behavior
Automaker should not create files with Windows reserved device names (NUL, CON, AUX, COM1-9, LPT1-9, PRN).
Actual Behavior
A file named nul is created, causing:
- Git failure during
git add:error: short read while indexing nul error: nul: failed to insert into database error: unable to index file 'nul' fatal: adding files failed
Suggested Fix
Before creating any file, validate the filename against Windows reserved names:
const WINDOWS_RESERVED_NAMES = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\.|$)/i;
function isValidFilename(filename) {
return !WINDOWS_RESERVED_NAMES.test(filename);
}Alternatively, if a nul output is intentional (e.g., discarding output), use a cross-platform approach or a different naming convention on Windows.
Workaround
Users can manually remove the file using Git Bash or WSL:
rm ./nulAdditional Context
This issue affects any Windows user whose repository is:
- Under Git version control
- Synchronized via OneDrive, Dropbox, or similar cloud services
- Part of a CI/CD pipeline running on Windows
- OneDrive sync is also effected
References
- [Microsoft: Naming Files, Paths, and Namespaces](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions)
- [Git Issue Tracker - Reserved filenames on Windows](https://github.com/git-for-windows/git/issues)
Steps to Reproduce
see in description
Expected Behavior
see in description
Actual Behavior
see in description
Screenshots
No response
Relevant Logs
Additional Context
No response
Checklist
- I have searched existing issues to ensure this bug hasn't been reported already
- I have provided all required information above