mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Use homedir() from os package instead of env vars
This commit is contained in:
parent
6fc6207117
commit
e345ba4f60
1 changed files with 2 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ if (process.platform === 'win32') {
|
|||
|
||||
// Native
|
||||
const {resolve, isAbsolute} = require('path');
|
||||
const {homedir} = require('os');
|
||||
|
||||
// Packages
|
||||
const {parse: parseUrl} = require('url');
|
||||
|
|
@ -203,7 +204,7 @@ app.on('ready', () => installDevExtensions(isDev).then(() => {
|
|||
}
|
||||
});
|
||||
|
||||
rpc.on('new', ({rows = 40, cols = 100, cwd = process.argv[1] && isAbsolute(process.argv[1]) ? process.argv[1] : process.env.HOMEPATH || process.env.HOME, splitDirection}) => {
|
||||
rpc.on('new', ({rows = 40, cols = 100, cwd = process.argv[1] && isAbsolute(process.argv[1]) ? process.argv[1] : homedir(), splitDirection}) => {
|
||||
const shell = cfg.shell;
|
||||
const shellArgs = cfg.shellArgs && Array.from(cfg.shellArgs);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue