add default-shell and missing --login option for interactive mode

seriously @sindresorhus every single package I need…
This commit is contained in:
Guillermo Rauch 2016-07-01 16:50:28 -07:00
parent 4bc58a4da1
commit a4bfd0ae1e
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
const { EventEmitter } = require('events');
const { spawn } = require('child_pty');
const { exec } = require('child_process');
const defaultShell = require('default-shell');
const TITLE_POLL_INTERVAL = 1000;
@ -8,7 +9,7 @@ module.exports = class Session extends EventEmitter {
constructor ({ rows, cols }) {
super();
this.pty = spawn('bash', [], {
this.pty = spawn(defaultShell, ['--login'], {
cols,
rows,
cwd: process.env.HOME,