Skip to content
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

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

Merged
merged 2 commits into from
Apr 18, 2020
Merged

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
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