File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import { localize, init } from 'vscode-nls-i18n';
2828
2929// this method is called when your extension is activated
3030// your extension is activated the very first time the command is executed
31- export function activate ( context : vscode . ExtensionContext ) {
31+ export async function activate ( context : vscode . ExtensionContext ) {
3232 init ( context . extensionPath ) ;
3333
3434 const CommitType : Array < CommitType > = GetCommitTypes ( ) ;
@@ -37,7 +37,7 @@ export function activate(context: vscode.ExtensionContext) {
3737
3838 //获取是否在git扩展内 Gets whether it is in the git extension
3939 function getGitExtension ( ) {
40- return vscode . extensions . getExtension < GitExtension > ( 'vscode.git' ) ?. exports ;
40+ return vscode . extensions . getExtension < GitExtension > ( 'vscode.git' ) ?. activate ( ) ;
4141 }
4242 //Commit message config
4343 const message_config : GitMessage = {
@@ -89,7 +89,7 @@ export function activate(context: vscode.ExtensionContext) {
8989 return result . trim ( ) ;
9090 }
9191
92- const gitExtension = getGitExtension ( ) ;
92+ const gitExtension = await getGitExtension ( ) ;
9393
9494 if ( ! gitExtension ?. enabled ) {
9595 vscode . window . showErrorMessage (
You can’t perform that action at this time.
0 commit comments