Return to original logic for ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT
#831
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.
Identify the Bug
In macOS or Linux, with an already-open instance of Pulsar, use your shell to change to an atypical directory, then run
pulsar .
. When the window opens, open the dev tools, then runprocess.env.PWD
in the shell. The returned value will be/
, rather than the directory from which you invokedpulsar
.This might also manifest when Pulsar is launched from scratch; not sure.
Description of the Change
This change seems to be the culprit. (I think it just assigns
ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT
rather than exporting it, but I try not to know too much aboutbash
for fear that I might one day be asked to write some.) So I reverted it, or at least the part having to do withATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT
.Alternate Designs
Nah, better to go with something tried and true.
Possible Drawbacks
Can’t think of any.
Verification Process
This was hard to verify because
pulsar
is symlinked to your app path (in my case,/Applications/Pulsar.app/Contents/Resources/pulsar.sh
) and the script assumes it’ll be run in that context. But you can temporarily define the variables in your shell……or the equivalents on Linux. Then you can run
pulsar.sh
directly from its location in your local copy of the repo. You can then repeat the steps from above and verify thatprocess.env.PWD
matches the directory you launched Pulsar from.Release Notes
pulsar
binary was run.