-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4105bb3
commit 1a8dc5e
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* -------------------------------------------------------------------------------------------- | ||
* Copyright (c) 2023 Savoir-faire Linux. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
* ------------------------------------------------------------------------------------------ */ | ||
|
||
import type * as vscode from 'vscode' | ||
import { BitbakePseudoTerminal } from './BitbakeTerminal' | ||
import { type BitbakeDriver } from '../driver/BitbakeDriver' | ||
|
||
export class BitbakeTerminalProfileProvider implements vscode.TerminalProfileProvider { | ||
private readonly bitbakeDriver: BitbakeDriver | ||
|
||
constructor (bitbakeDriver: BitbakeDriver) { | ||
this.bitbakeDriver = bitbakeDriver | ||
} | ||
|
||
provideTerminalProfile (token: vscode.CancellationToken): vscode.ProviderResult<vscode.TerminalProfile> { | ||
const pty = new BitbakePseudoTerminal(this.bitbakeDriver) | ||
pty.runProcess('bash') // let the fun begin! | ||
return { | ||
options: { | ||
name: 'Bitbake', | ||
pty | ||
} satisfies vscode.ExtensionTerminalOptions | ||
} | ||
} | ||
} |