check if remote containers extension is active (#627)
* check if remote containers extension is active * avoid generating dev container definition files when remote - containers is not active
This commit is contained in:
Родитель
ea78361823
Коммит
3cdb3addb9
|
@ -1,4 +1,8 @@
|
|||
# Change Log
|
||||
## 1.25.7 - 2022-02-04
|
||||
### Changed
|
||||
* Fixed dev container load errors when dependency list include VSCode Remote Containers extension.
|
||||
|
||||
## 1.25.6 - 2022-01-28
|
||||
### Changed
|
||||
* Fixed issue with Dev Container generation for External module sources
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "azure-iot-edge",
|
||||
"version": "1.25.6",
|
||||
"version": "1.25.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "azure-iot-edge",
|
||||
"version": "1.25.6",
|
||||
"version": "1.25.7",
|
||||
"license": "SEE LICENSE IN LICENSE.txt",
|
||||
"dependencies": {
|
||||
"@azure/arm-containerregistry": "^8.1.1",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "azure-iot-edge",
|
||||
"displayName": "Azure IoT Edge",
|
||||
"description": "This extension is now a part of Azure IoT Tools extension pack. We highly recommend installing Azure IoT Tools to get full capabilities for Azure IoT development. Develop, deploy, debug, and manage your IoT Edge solution.",
|
||||
"version": "1.25.6",
|
||||
"version": "1.25.7",
|
||||
"publisher": "vsciot-vscode",
|
||||
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
|
||||
"icon": "logo.png",
|
||||
|
@ -588,7 +588,6 @@
|
|||
},
|
||||
"extensionDependencies": [
|
||||
"ms-vscode.azure-account",
|
||||
"ms-vscode-remote.remote-containers",
|
||||
"vsciot-vscode.azure-iot-toolkit"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -310,6 +310,12 @@ export class EdgeManager {
|
|||
return;
|
||||
}
|
||||
|
||||
const remoteExtenstion = vscode.extensions.getExtension("ms-vscode-remote.remote-containers");
|
||||
if (remoteExtenstion === undefined) {
|
||||
vscode.window.showInformationMessage("This feature requires the 'Remote - Container' extension be installed and active. Please see http://aka.ms/remcon for more details.");
|
||||
return;
|
||||
}
|
||||
|
||||
const workspaceFolders = vscode.workspace.workspaceFolders;
|
||||
const defaultFolder: vscode.Uri | undefined = workspaceFolders && workspaceFolders.length > 0 ? workspaceFolders[0].uri : undefined;
|
||||
const workspaceFolder = defaultFolder.fsPath;
|
||||
|
@ -348,6 +354,7 @@ export class EdgeManager {
|
|||
description: "",
|
||||
},
|
||||
];
|
||||
|
||||
const doYouWishToReload = await vscode.window.showQuickPick(reloadDontReload, { placeHolder: Constants.reloadInDevContainer, ignoreFocusOut: true });
|
||||
if (doYouWishToReload && doYouWishToReload.label === Constants.CHOICE_YES) {
|
||||
await vscode.commands.executeCommand("remote-containers.reopenInContainer", vscode.Uri.file(workspaceFolder), false);
|
||||
|
@ -1003,8 +1010,7 @@ export class EdgeManager {
|
|||
vscode.window.showInformationMessage("New module for '" + template + "'");
|
||||
}
|
||||
|
||||
if (containerSource.length > 0)
|
||||
{
|
||||
if (containerSource.length > 0) {
|
||||
await fse.copy(containerSource, slnPath, { overwrite : true });
|
||||
await fse.copy(sourceLibrayScriptsPath, path.join(slnPath, Constants.dotDevContainer, Constants.libraryScriptsFolder));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче