Skip to content

shelljs.find doesn't return contents of a dir on windows #1227

@cristiand391

Description

@cristiand391

Repro: https://github.com/cristiand391/shelljs-find-windows-bug

I put a dummy project dir for testing:

project/
└── source
    └── index.js

shelljs.find used to return the contents of the dir (recursive read):
https://github.com/cristiand391/shelljs-find-windows-bug/blob/db712a1b83e66ed005e78893e7b480d58175f66c/test.js#L5

this works on linux and windows when using shelljs v0.8.5 but fails on windows after updating to v0.9.0 or higher:

CI runs:

✅ v0.8.5 linux
✅ v0.8.5 windows:
https://github.com/cristiand391/shelljs-find-windows-bug/actions/runs/16007671602

✅ v.0.9.0 linux
❌ v0.9.0 windows:
https://github.com/cristiand391/shelljs-find-windows-bug/actions/runs/16007821671

only 1 filepath was returned:
Image

✅ v0.10.0 linux
❌ v0.10.0 windows
https://github.com/cristiand391/shelljs-find-windows-bug/actions/runs/16007701904

only 1 filepath was returned:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixBug/defect, or a fix for such a problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions