Leverage fs.stat to ensure it works by Electron package#1375
Merged
minggangw merged 1 commit intoRobotWebTools:developfrom Jan 16, 2026
Merged
Leverage fs.stat to ensure it works by Electron package#1375minggangw merged 1 commit intoRobotWebTools:developfrom
minggangw merged 1 commit intoRobotWebTools:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates file system operations to improve compatibility with Electron's ASAR packaging system by replacing fs.access() with fs.stat() for existence checks. This is important since the project explicitly targets Electron (as seen in package.json with --target electron@23.0.0).
Changes:
- Replaced
fs.access()withfs.stat()in thefindPackagesInDirectoryfunction - Replaced
fsPromises.access()withfsPromises.stat()in thepathExistsutility function
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rosidl_gen/packages.js | Updated directory existence check for 'share' folder to use fs.stat() instead of fs.access() |
| lib/utils.js | Updated pathExists() utility function to use fsPromises.stat() instead of fsPromises.access() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
minggangw
added a commit
that referenced
this pull request
Jan 22, 2026
This pull request updates file system operations to improve compatibility with Electron's ASAR packaging system by replacing `fs.access()` with `fs.stat()` for existence checks. This is important since the project explicitly targets Electron (as seen in `package.json` with `--target electron@23.0.0`). **Changes:** - Replaced `fs.access()` with `fs.stat()` in the `findPackagesInDirectory` function - Replaced `fsPromises.access()` with `fsPromises.stat()` in the `pathExists` utility function Fix: #1375
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request updates file system operations to improve compatibility with Electron's ASAR packaging system by replacing
fs.access()withfs.stat()for existence checks. This is important since the project explicitly targets Electron (as seen inpackage.jsonwith--target electron@23.0.0).Changes:
fs.access()withfs.stat()in thefindPackagesInDirectoryfunctionfsPromises.access()withfsPromises.stat()in thepathExistsutility functionFix: #1375