Fix installation of act
Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
12
src/act.ts
12
src/act.ts
@@ -1,7 +1,7 @@
|
||||
import * as path from "path";
|
||||
import { commands, ExtensionContext, ShellExecution, TaskGroup, TaskPanelKind, TaskRevealKind, tasks, TaskScope, Uri, window, workspace, WorkspaceFolder } from "vscode";
|
||||
import { ComponentsManager } from "./componentsManager";
|
||||
import { historyTreeDataProvider } from './extension';
|
||||
import { componentsTreeDataProvider, historyTreeDataProvider } from './extension';
|
||||
import { HistoryManager, HistoryStatus } from './historyManager';
|
||||
import { SettingsManager } from './settingsManager';
|
||||
import { StorageKey, StorageManager } from './storageManager';
|
||||
@@ -147,6 +147,14 @@ export class Act {
|
||||
}
|
||||
});
|
||||
|
||||
// Refresh components view after installation
|
||||
tasks.onDidEndTask(e => {
|
||||
const taskDefinition = e.execution.task.definition;
|
||||
if (taskDefinition.type === 'nektos/act installation') {
|
||||
componentsTreeDataProvider.refresh();
|
||||
}
|
||||
});
|
||||
|
||||
tasks.onDidStartTaskProcess(e => {
|
||||
const taskDefinition = e.execution.task.definition;
|
||||
if (taskDefinition.type === 'GitHub Local Actions') {
|
||||
@@ -307,7 +315,7 @@ export class Act {
|
||||
await tasks.executeTask({
|
||||
name: 'nektos/act',
|
||||
detail: 'Install nektos/act',
|
||||
definition: { type: 'GitHub Local Actions' },
|
||||
definition: { type: 'nektos/act installation' },
|
||||
source: 'GitHub Local Actions',
|
||||
scope: TaskScope.Workspace,
|
||||
isBackground: true,
|
||||
|
||||
@@ -168,7 +168,7 @@ export class ComponentsManager {
|
||||
return;
|
||||
}
|
||||
|
||||
window.showInformationMessage('Once Docker Engine is successfully started, refresh the components view.', 'Refresh').then(async value => {
|
||||
window.showInformationMessage('Once Docker Engine is successfully started (this could take a few seconds), refresh the components view.', 'Refresh').then(async value => {
|
||||
if (value === 'Refresh') {
|
||||
componentsTreeDataProvider.refresh();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ export default class ComponentsTreeDataProvider implements TreeDataProvider<Gith
|
||||
}),
|
||||
commands.registerCommand('githubLocalActions.installComponent', async (componentTreeItem: ComponentTreeItem) => {
|
||||
await componentTreeItem.component.installation();
|
||||
this.refresh();
|
||||
}),
|
||||
commands.registerCommand('githubLocalActions.startComponent', async (componentTreeItem: ComponentTreeItem) => {
|
||||
const start = componentTreeItem.component.start;
|
||||
|
||||
Reference in New Issue
Block a user