Skip to content

Conversation

ebifrier
Copy link
Contributor

@ebifrier ebifrier commented Apr 17, 2020

fix #695

Comment on lines 91 to 98
let fileExistsSync = path => {
try {
fs.accessSync(path, fs.F_OK)
return true
} catch {
return false
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply use fs.existsSync()?

Copy link
Contributor Author

@ebifrier ebifrier Apr 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that fs.existsSync is deprecated, but that information was outdated. I modified it to use fs.existsSync. Thanks

@yishn
Copy link
Member

yishn commented Apr 18, 2020

Thanks a lot for your PR!

@yishn yishn merged commit 4e18b4e into SabakiHQ:master Apr 18, 2020
@ebifrier ebifrier deleted the pathexists branch April 18, 2020 13:41
yongxin12 pushed a commit to yongxin12/Sabaki-web-test that referenced this pull request Aug 30, 2025
… it doesn't (SabakiHQ#698)

* Call spawn with absolute path if the file exists, or relative path if it doesn't.

* Use fs.existsSync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Engines do not honor system paths on Linux
2 participants