From c2376b84f9c5e58d754f213826fea0e50d3170da Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Wed, 7 Oct 2020 12:31:24 -0500 Subject: [PATCH] fix: fix initial command set --- spec/config-spec.js | 8 ++++---- src/config.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/config-spec.js b/spec/config-spec.js index ec60e909..e4f85a64 100644 --- a/spec/config-spec.js +++ b/spec/config-spec.js @@ -456,7 +456,7 @@ describe('config', () => { Object.defineProperty(process, 'platform', { value: 'win32', }) - atom.config.set('x-terminal.command', configDefaults.command) + atom.config.set('x-terminal.spawnPtySettings.command', configDefaults.command) }) afterEach(() => { @@ -474,7 +474,7 @@ describe('config', () => { throw new Error('ENOENT') }) - expect(atom.config.get('x-terminal.command')).toBe(shell) + expect(atom.config.get('x-terminal.spawnPtySettings.command')).toBe(shell) }) it('should set x-terminal.command to powershell', async () => { @@ -486,7 +486,7 @@ describe('config', () => { throw new Error('ENOENT') }) - expect(atom.config.get('x-terminal.command')).toBe(shell) + expect(atom.config.get('x-terminal.spawnPtySettings.command')).toBe(shell) }) it('should set x-terminal.command to powershell', async () => { @@ -495,7 +495,7 @@ describe('config', () => { throw new Error('ENOENT') }) - expect(atom.config.get('x-terminal.command')).toBe(shell) + expect(atom.config.get('x-terminal.spawnPtySettings.command')).toBe(shell) }) }) }) diff --git a/src/config.js b/src/config.js index b03ab324..72cfa72c 100644 --- a/src/config.js +++ b/src/config.js @@ -966,8 +966,8 @@ export async function setInitialCommand (which) { } } - if (command && atom.config.get('x-terminal.command') === configDefaults.command) { - atom.config.set('x-terminal.command', command) + if (command && atom.config.get('x-terminal.spawnPtySettings.command') === configDefaults.command) { + atom.config.set('x-terminal.spawnPtySettings.command', command) } }