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 * as path from "path";
|
||||||
import { commands, ExtensionContext, ShellExecution, TaskGroup, TaskPanelKind, TaskRevealKind, tasks, TaskScope, Uri, window, workspace, WorkspaceFolder } from "vscode";
|
import { commands, ExtensionContext, ShellExecution, TaskGroup, TaskPanelKind, TaskRevealKind, tasks, TaskScope, Uri, window, workspace, WorkspaceFolder } from "vscode";
|
||||||
import { ComponentsManager } from "./componentsManager";
|
import { ComponentsManager } from "./componentsManager";
|
||||||
import { historyTreeDataProvider } from './extension';
|
import { componentsTreeDataProvider, historyTreeDataProvider } from './extension';
|
||||||
import { HistoryManager, HistoryStatus } from './historyManager';
|
import { HistoryManager, HistoryStatus } from './historyManager';
|
||||||
import { SettingsManager } from './settingsManager';
|
import { SettingsManager } from './settingsManager';
|
||||||
import { StorageKey, StorageManager } from './storageManager';
|
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 => {
|
tasks.onDidStartTaskProcess(e => {
|
||||||
const taskDefinition = e.execution.task.definition;
|
const taskDefinition = e.execution.task.definition;
|
||||||
if (taskDefinition.type === 'GitHub Local Actions') {
|
if (taskDefinition.type === 'GitHub Local Actions') {
|
||||||
@@ -307,7 +315,7 @@ export class Act {
|
|||||||
await tasks.executeTask({
|
await tasks.executeTask({
|
||||||
name: 'nektos/act',
|
name: 'nektos/act',
|
||||||
detail: 'Install nektos/act',
|
detail: 'Install nektos/act',
|
||||||
definition: { type: 'GitHub Local Actions' },
|
definition: { type: 'nektos/act installation' },
|
||||||
source: 'GitHub Local Actions',
|
source: 'GitHub Local Actions',
|
||||||
scope: TaskScope.Workspace,
|
scope: TaskScope.Workspace,
|
||||||
isBackground: true,
|
isBackground: true,
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export class ComponentsManager {
|
|||||||
return;
|
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') {
|
if (value === 'Refresh') {
|
||||||
componentsTreeDataProvider.refresh();
|
componentsTreeDataProvider.refresh();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ export default class ComponentsTreeDataProvider implements TreeDataProvider<Gith
|
|||||||
}),
|
}),
|
||||||
commands.registerCommand('githubLocalActions.installComponent', async (componentTreeItem: ComponentTreeItem) => {
|
commands.registerCommand('githubLocalActions.installComponent', async (componentTreeItem: ComponentTreeItem) => {
|
||||||
await componentTreeItem.component.installation();
|
await componentTreeItem.component.installation();
|
||||||
this.refresh();
|
|
||||||
}),
|
}),
|
||||||
commands.registerCommand('githubLocalActions.startComponent', async (componentTreeItem: ComponentTreeItem) => {
|
commands.registerCommand('githubLocalActions.startComponent', async (componentTreeItem: ComponentTreeItem) => {
|
||||||
const start = componentTreeItem.component.start;
|
const start = componentTreeItem.component.start;
|
||||||
|
|||||||
Reference in New Issue
Block a user