attempt number two to fix null file issue

This commit is contained in:
Garrett Serack 2018-09-17 13:36:28 -07:00
Родитель a2df81cde2
Коммит fb6d44ee7e
2 изменённых файлов: 9 добавлений и 4 удалений

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

@ -85,7 +85,9 @@ export class AutoRestExtension {
for (const each of items) {
try {
const content = await channel.sendRequest(IAutoRestPluginInitiator_Types.ReadFile, sessionId, each);
send(each, content);
if (content || content === "") {
send(path, content);
}
} catch (E) {
}
@ -98,7 +100,10 @@ export class AutoRestExtension {
try {
const content = await channel.sendRequest(IAutoRestPluginInitiator_Types.ReadFile, sessionId, path);
send(path, content);
if (content || content === "") {
send(path, content);
}
} catch {
// didn't get that either.
}

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

@ -1,6 +1,6 @@
{
"name": "@microsoft.azure/autorest-extension-base",
"version": "1.0.19",
"version": "1.0.0",
"description": "Library for easily creating AutoRest extensions",
"main": "dist/main.js",
"scripts": {
@ -32,4 +32,4 @@
"dependencies": {
"vscode-jsonrpc": "^3.5.0"
}
}
}