Optimize config not set error on windows (#518)

* Optimize config not set error on windows

* Change version to 1.19.0-rc1
This commit is contained in:
Renlong Tu 2019-11-15 03:32:33 +01:00 коммит произвёл GitHub
Родитель 406099b871
Коммит 3e7e336ad1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -2,7 +2,7 @@
"name": "azure-iot-edge",
"displayName": "Azure IoT Edge",
"description": "Develop, deploy, debug, and manage your IoT Edge solution",
"version": "1.19.0-rc",
"version": "1.19.0-rc1",
"publisher": "vsciot-vscode",
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
"icon": "logo.png",

Просмотреть файл

@ -196,6 +196,7 @@ export class Constants {
public static dockerNotRunningErrorMsgPatternOnWindows = "This error may also indicate that the docker daemon is not running";
public static dockerNotRunningErrorMsgPatternOnLinux = "Is the docker daemon running";
public static permissionDeniedErrorMsgPatternOnLinux = "permission denied";
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";
public static skipForNow = "Skip for Now";
public static learnMore = "Learn More";
public static install = "Install";

Просмотреть файл

@ -334,7 +334,11 @@ export class Simulator {
try {
await Executor.executeCMD(null, this.getAdjustedSimulatorExecutorPath(true), { shell: true }, "validateconfig");
} catch (error) {
throw new ConfigNotSetError(error.message);
let errorMsg = error.message;
if (error.errorCode === 2 && Simulator.currentPlatform === "win32") {
errorMsg = Constants.connectionStringNotSetErrorMsgOnWindows;
}
throw new ConfigNotSetError(errorMsg);
}
}
}