hypercwd icon indicating copy to clipboard operation
hypercwd copied to clipboard

[Error] When I reload then open a new tab

Open lqs469 opened this issue 6 years ago • 1 comments

When I reload a tab, Then I open a new tab or split a new tab, Caught Error below:


Uncaught (in promise) TypeError: Cannot read property 'pid' of undefined
    at setCwd (.../hyper_plugins/node_modules/hypercwd/setCwd.js:8)
    at .../hyper_plugins/node_modules/hypercwd/linuxActionHandler.js:29
    at bundle.js:1
    at bundle.js:1
    at bundle.js:1
    at dispatch (bundle.js:1)
    at bundle.js:1
    at Object.dispatch (bundle.js:1)
    at EventEmitter.u.a.on (bundle.js:1)
    at emitOne (events.js:115)

const setCwd = async ({ dispatch, action, tab }) => {
  const newCwd = await promiseExec(
// .../hyper_plugins/node_modules/hypercwd/setCwd.js:8
// Error there,
// this tab is undefined.
==>    `lsof -p ${tab.pid} | grep cwd | tr -s ' ' | cut -d ' ' -f9-`);
  const cwd = newCwd.trim();
  dispatch({
    type: 'SESSION_SET_CWD',
    cwd,
  });
};

System: MacOS Hight Sierra 10.13.1 (17B48).

lqs469 avatar Jun 26 '18 13:06 lqs469