Closed kiavashp closed 6 months ago
Please let me know if you think the README should be updated to specify the return value of this method explicitly, or any tests should be added, etc.
I didn't have a model for what those would look like in the rest of the project.
Thanks!
The readme needs to be updated, yes.
@sindresorhus docs updated!
Summary
This PR returns the value of
shell.openPath()
in theopenInEditor
methodMotivation
If someone needs to perform an action only after the path has been opened, there's currently no way to do that, since the async
shell.openPath()
call isn't waited on, or return value passed through.Use Case
My specific use case was wanting to quit the app after using this method to open a invalid (not matching the schema) config file. And without the return value I had to use
shell.openPath()
directly so I couldawait
it.