Add status check and login for github cli extension

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-11-25 00:11:48 -05:00
parent b6a12f35a8
commit 6292da3f72
3 changed files with 16 additions and 15 deletions

View File

@@ -16,7 +16,7 @@ export namespace ConfigurationManager {
export const group: string = 'githubLocalActions';
export const searchPrefix: string = '@ext:sanjulaganepola.github-local-actions';
export function initialize(): void {
export async function initialize(): Promise<void> {
let dockerDesktopPath = ConfigurationManager.get<string>(Section.dockerDesktopPath);
if (!dockerDesktopPath) {
switch (process.platform) {
@@ -30,12 +30,12 @@ export namespace ConfigurationManager {
return;
}
ConfigurationManager.set(Section.dockerDesktopPath, dockerDesktopPath);
await ConfigurationManager.set(Section.dockerDesktopPath, dockerDesktopPath);
}
let actCommand = ConfigurationManager.get<string>(Section.actCommand);
if (!actCommand) {
ConfigurationManager.set(Section.actCommand, Act.command);
await ConfigurationManager.set(Section.actCommand, Act.command);
}
}