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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set session CWD only if there is an active session #2191

Merged
merged 1 commit into from
Sep 11, 2017
Merged

Set session CWD only if there is an active session #2191

merged 1 commit into from
Sep 11, 2017

Conversation

hharnisc
Copy link
Contributor

@hharnisc hharnisc commented Sep 9, 2017

Hey Zeit team 馃憢

I got a bug report on the hypercwd showing that the window lingers around after CMD + W closing all the windows.

hharnisc/hypercwd#28

After digging around a bit, it is because hypercwd now dispatches a SESSION_SET_CWD before an active session is created at the CONFIG_LOAD event (allows for setting an initial working directory on the first session 馃槃 ).

So if there is no active session, the reducer catches the SESSION_SET_CWD action and creates a session with the key null.

This PR checks for an active session and conditionally sets CWD on the session if it exists. I've tested this with the hypercwd plugin and works as expected now - so this is ready to go.

Copy link
Contributor

@albinekb albinekb left a comment

Choose a reason for hiding this comment

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

馃憤 Thanks. I think this is the best solution 馃憣

@albinekb albinekb merged commit b5f0675 into vercel:master Sep 11, 2017
h93xV2 pushed a commit to h93xV2/hyper that referenced this pull request Sep 11, 2017
chabou added a commit that referenced this pull request Sep 11, 2017
* master:
  Fix yarn.lock (#2194)
  Fix for keymapping bug on Linux and Windows (#2189)
  Set session CWD only if there is an active session (#2191)
  Upgrade Electron to v1.7.6 (#2193)
  Fix plugin path in dev mode (#2192)
spncrgr pushed a commit to spncrgr/hyper that referenced this pull request Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants