Skip to content

Commit

Permalink
fix: fix initial command set
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Oct 7, 2020
1 parent e2f2a2e commit c2376b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions spec/config-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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 () => {
Expand All @@ -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 () => {
Expand All @@ -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)
})
})
})
4 changes: 2 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit c2376b8

Please sign in to comment.