Skip to content

Commit 3e7e336

Browse files
authored
Optimize config not set error on windows (#518)
* Optimize config not set error on windows * Change version to 1.19.0-rc1
1 parent 406099b commit 3e7e336

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "azure-iot-edge",
33
"displayName": "Azure IoT Edge",
44
"description": "Develop, deploy, debug, and manage your IoT Edge solution",
5-
"version": "1.19.0-rc",
5+
"version": "1.19.0-rc1",
66
"publisher": "vsciot-vscode",
77
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
88
"icon": "logo.png",

src/common/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export class Constants {
196196
public static dockerNotRunningErrorMsgPatternOnWindows = "This error may also indicate that the docker daemon is not running";
197197
public static dockerNotRunningErrorMsgPatternOnLinux = "Is the docker daemon running";
198198
public static permissionDeniedErrorMsgPatternOnLinux = "permission denied";
199+
public static connectionStringNotSetErrorMsgOnWindows = "Cannot find config file. You can press Ctrl + Shift + P to open command palette and run `Azure IoT Edge: Setup IoT Edge Simulator` to setup IoT Edge simulator first.\r\n";
199200
public static skipForNow = "Skip for Now";
200201
public static learnMore = "Learn More";
201202
public static install = "Install";

src/edge/simulator.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ export class Simulator {
334334
try {
335335
await Executor.executeCMD(null, this.getAdjustedSimulatorExecutorPath(true), { shell: true }, "validateconfig");
336336
} catch (error) {
337-
throw new ConfigNotSetError(error.message);
337+
let errorMsg = error.message;
338+
if (error.errorCode === 2 && Simulator.currentPlatform === "win32") {
339+
errorMsg = Constants.connectionStringNotSetErrorMsgOnWindows;
340+
}
341+
throw new ConfigNotSetError(errorMsg);
338342
}
339343
}
340344
}

0 commit comments

Comments
 (0)