Fix error on workflow file

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-09-29 11:30:00 -04:00
parent b30fc76de5
commit a9e2f0338a
2 changed files with 3 additions and 2 deletions

View File

@@ -12,7 +12,8 @@ export default class WorkflowTreeItem extends TreeItem implements GithubLocalAct
this.contextValue = WorkflowTreeItem.contextValue; this.contextValue = WorkflowTreeItem.contextValue;
this.iconPath = new ThemeIcon('layers'); this.iconPath = new ThemeIcon('layers');
this.tooltip = `Name: ${workflow.name}\n` + this.tooltip = `Name: ${workflow.name}\n` +
`Path: ${workflow.uri.fsPath}`; `Path: ${workflow.uri.fsPath}\n` +
(workflow.error ? `Error: ${workflow.error}` : ``);
if(workflow.error) { if(workflow.error) {
this.resourceUri = Uri.parse(`${WorkflowTreeItem.contextValue}:${workflow.name}?error=${workflow.error}`, true); this.resourceUri = Uri.parse(`${WorkflowTreeItem.contextValue}:${workflow.name}?error=${workflow.error}`, true);

View File

@@ -73,7 +73,7 @@ export class WorkflowsManager {
workflows.push({ workflows.push({
name: (yamlContent ? yamlContent.name : undefined) || path.parse(workflowFileUri.fsPath).name, name: (yamlContent ? yamlContent.name : undefined) || path.parse(workflowFileUri.fsPath).name,
uri: workflowFileUri, uri: workflowFileUri,
error: 'Failed to parse workflow file' error: 'Failed to parse workflow file.'
}); });
} }
} }