Skip to content

Commit 3eafeae

Browse files
committed
(maint) Only check for local install on stdio
This commit modifies the installation directory check to only check the existance if we are attempting to start a local language server.
1 parent fe12a5d commit 3eafeae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/extension.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { NodeGraphFeature } from './feature/NodeGraphFeature';
1616
import { PDKFeature } from './feature/PDKFeature';
1717
import { PuppetResourceFeature } from './feature/PuppetResourceFeature';
1818
import { ILogger } from './logging';
19+
import { ProtocolType, ConnectionType } from './interfaces';
1920

2021
var connManager: ConnectionManager;
2122
const langID = 'puppet'; // don't change this
@@ -76,6 +77,14 @@ function checkForLegacySettings() {
7677
}
7778

7879
function checkInstallDirectory(configSettings: ConnectionConfiguration, logger: ILogger) {
80+
if(configSettings.protocol === ProtocolType.TCP){
81+
if(configSettings.type === ConnectionType.Remote){
82+
// Return if we are connecting to a remote TCP LangServer
83+
return;
84+
}
85+
}
86+
87+
// we want to check directory if STDIO or Local TCP
7988
if (!fs.existsSync(configSettings.puppetBaseDir)) {
8089
showErrorMessage(
8190
`Could not find a valid Puppet installation at '${

0 commit comments

Comments
 (0)