Skip to content

Conversation

@alvedder
Copy link

@alvedder alvedder commented Feb 8, 2026

Problem description

The new POSIX shell commands for ls and glob introduced in #88 have \\t in their patterns.
This produces commands like that:

find '/workspace' -not -path '/workspace' -exec stat -c '%s\\t%Y\\t%F\\t%n' {} + 2>/dev/null || true

and they in turn produce output like this:

632\\t1770575029\\tregular file\\t/workspace/dragon_ascii_art.txt\n25\\t1770330477\\tregular file\\t/workspace/ascii_art_cat.txt\n

then this output is split into lines and passed to parseStatLine and at line 113 it essentially always returns -1:

"632\\t1770575029\\tregular file\\t/workspace/dragon_ascii_art.txt".indexOf("\t") // returns -1

Because \\t is interpreted as \ + t, not \ + \t:

'\\' + 't' === '\\t' // returns true

Fix

Drop extra \ in the patterns

@alvedder alvedder force-pushed the alvedder/ls-n-find-commands-fix branch from a5a3078 to d30013d Compare February 9, 2026 00:27
@christian-bromann
Copy link
Member

@alvedder thanks for the contribution, can you double check if issue is still appearing in #201 ?

@christian-bromann
Copy link
Member

We have published some improvements on cross platform compatibility for sandboxes in v1.7.3. Would you mind to double check whether this also resolves the issue you experienced?

@alvedder
Copy link
Author

@christian-bromann #201 indeed resolved the issue, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants