Skip to content

[Bug]: Automaker creates reserved filename "nul" on Windows, blocking Git and OneDrive sync #684

@xerberde

Description

@xerberde

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

  1. Run Automaker on a Windows system
  2. Let Automaker process features/events
  3. 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:

  1. 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 ./nul

Additional 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions