-
Notifications
You must be signed in to change notification settings - Fork 676
fix: Windows spawn ENOENT and EISDIR errors (#116) #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,10 +136,10 @@ function formatSection(title, body) { | |
| function formatUntrackedFile(cwd, relativePath) { | ||
| const absolutePath = path.join(cwd, relativePath); | ||
| const stat = fs.statSync(absolutePath); | ||
| if (stat.size > MAX_UNTRACKED_BYTES) { | ||
| return `### ${relativePath}\n(skipped: ${stat.size} bytes exceeds ${MAX_UNTRACKED_BYTES} byte limit)`; | ||
| if (stat.isDirectory()) { | ||
| return `### ${relativePath} | ||
| (skipped: directory)`; | ||
| } | ||
|
|
||
| const buffer = fs.readFileSync(absolutePath); | ||
|
Comment on lines
+139
to
143
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new directory guard removed the previous Useful? React with 👍 / 👎. |
||
| if (!isProbablyText(buffer)) { | ||
| return `### ${relativePath}\n(skipped: binary file)`; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--full-accessthrough to task executionexecuteTaskRunnow selects sandbox mode fromrequest.fullAccess, but task requests built inhandleTasknever set that property, so this condition is always false. As a result, users can pass--full-accessand still run inread-only/workspace-write, which silently breaks commands that needdanger-full-accesspermissions.Useful? React with 👍 / 👎.