Fix Windows Deno directory creation error in runner.js #9108
+5
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Changes Description
On Windows with Deno,
pyodide.FS.mkdir()throws errors with empty messages when directories exist, causing thee.message.includes('File exists')check to fail silently.Fix: Use
pyodide.FS.analyzePath()to check directory existence before attempting creation, rather than relying on error message content.✅ Contributor Checklist
None.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.deno.land/usr/bin/curl curl -s REDACTED /home/REDACTED/work/dspy/dspy/tests/utils/test_exceptions.py /home/REDACTED/work/dspy/dspy/tests/utils/test_langchain_tool.py /home/REDACTED/work/dspy/dspy/tests/utils/test_unbatchify.py /home/REDACTED/work/dspy/dspy/tests/utils/test_asyncify.py /home/REDACTED/work/dspy/dspy/tests/utils/test_mcp.py /home/REDACTED/work/dspy/dspy/tests/utils/test_settings.py /home/REDACTED/work/dspy/dspy/tests/utils/test_usage_tracker.py /home/REDACTED/work/dspy/dspy/tests/utils/__init__.py /home/REDACTED/work/dspy/dspy/tests/streaming/test_streaming.py(dns block)/usr/bin/curl curl -s REDACTED(dns block)/home/REDACTED/.deno/bin/deno deno run --allow-read=/home/REDACTED/work/dspy/dspy/dspy/primitives/REDACTED.js,/home/REDACTED/.cache/deno /home/REDACTED/work/dspy/dspy/dspy/primitives/REDACTED.js(dns block)esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.