File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -626,7 +626,20 @@ function bindAddrFromAllSources(...argsConfig: Args[]): Addr {
626
626
}
627
627
628
628
export const shouldRunVsCodeCli = ( args : Args ) : boolean => {
629
- return ! ! args [ "list-extensions" ] || ! ! args [ "install-extension" ] || ! ! args [ "uninstall-extension" ]
629
+ // Create new interface with only these keys
630
+ // Pick<Args, "list-extensions" | "install-extension" | "uninstall-extension">
631
+ // Get the keys of new interface
632
+ // keyof ...
633
+ // Turn that into an array
634
+ // Array<...>
635
+ type ExtensionArgs = Array < keyof Pick < Args , "list-extensions" | "install-extension" | "uninstall-extension" > >
636
+ const extensionRelatedArgs : ExtensionArgs = [ "list-extensions" , "install-extension" , "uninstall-extension" ]
637
+
638
+ const argKeys = Object . keys ( args )
639
+
640
+ // If any of the extensionRelatedArgs are included in args
641
+ // then we don't want to run the vscode cli
642
+ return extensionRelatedArgs . some ( ( arg ) => argKeys . includes ( arg ) )
630
643
}
631
644
632
645
/**
You can’t perform that action at this time.
0 commit comments