Skip to content

v1.5.4 - Critical EISDIR Fix

Choose a tag to compare

@daymade daymade released this 12 Aug 14:51
· 24 commits to main since this release

🚨 Critical Bug Fix

This release fixes a critical bug that prevented ailock from running when users had a .ailock directory (instead of file) in their home or parent directories.

The Bug

  • Error: EISDIR: illegal operation on a directory, read
  • Cause: When ~/.ailock/ exists as a directory, ailock tried to read it as a file
  • Impact: Complete failure to run any ailock commands

The Fix

  • Added proper file vs directory checks using statSync().isFile()
  • Both .ailock and .gitignore discovery now skip directories
  • Comprehensive tests added to prevent regression

What's Changed

  • Fixed: EISDIR error when .ailock or .gitignore is a directory
  • Fixed: Missing glob package import (from v1.5.3)
  • Added: Comprehensive tests for directory handling
  • Added: Tests for GlobValidator
  • Added: Integration and E2E tests

Upgrading

npm update -g @code-is-cheap/ailock

Testing

The fix has been thoroughly tested with:

  • Unit tests for directory vs file detection
  • Integration tests for glob operations
  • E2E tests for CLI commands
  • Real-world scenario testing

Full commit: b2f51b4