File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,14 @@ async function getFileContent(
49
49
return cycle ;
50
50
} ) ( file ) ;
51
51
if ( has_cycle ) {
52
- vscode . window . showWarningMessage ( 'Cyclic dependency found from template' ) ;
52
+ const choice = await vscode . window . showWarningMessage (
53
+ 'Cyclic dependency found! Do you still want to insert the template?' ,
54
+ 'Yes' ,
55
+ 'No' ,
56
+ ) ;
57
+ if ( choice === 'No' ) {
58
+ return undefined ;
59
+ }
53
60
}
54
61
55
62
const contents = await Promise . all (
@@ -225,6 +232,10 @@ function registerCommands(context: vscode.ExtensionContext): void {
225
232
baseDirectory ,
226
233
dependencies ?? { } ,
227
234
) ;
235
+ if ( ! content ) {
236
+ return ;
237
+ }
238
+
228
239
const inserted = vscode . window . activeTextEditor ?. edit (
229
240
( edit : vscode . TextEditorEdit ) => {
230
241
if ( vscode . window . activeTextEditor ) {
You can’t perform that action at this time.
0 commit comments