Skip to content

Commit ec1bcc5

Browse files
authored
Show better message when opening deleted workflow (#108)
1 parent 383db7e commit ec1bcc5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/commands/openWorkflowFile.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ export function registerOpenWorkflowFile(context: vscode.ExtensionContext) {
1818

1919
const fileUri = getWorkflowUri(gitHubRepoContext, wf.path);
2020
if (fileUri) {
21-
const textDocument = await vscode.workspace.openTextDocument(fileUri);
22-
await vscode.window.showTextDocument(textDocument);
23-
return;
21+
try {
22+
const textDocument = await vscode.workspace.openTextDocument(fileUri);
23+
await vscode.window.showTextDocument(textDocument);
24+
return;
25+
} catch (e) {
26+
// Ignore error and show error message below
27+
}
2428
}
2529

2630
// File not found in workspace

0 commit comments

Comments
 (0)