We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 622fd88 commit 8726bf3Copy full SHA for 8726bf3
src/Azure.Functions.Cli/Actions/HostActions/StartHostAction.cs
@@ -150,7 +150,10 @@ private void CheckHostJsonId()
150
{
151
if (FileSystemHelpers.FileExists(ScriptConstants.HostMetadataFileName))
152
153
- var hostConfig = JsonConvert.DeserializeObject<JObject>(FileSystemHelpers.ReadAllTextFromFile(ScriptConstants.HostMetadataFileName));
+ var hostJsonContent = FileSystemHelpers.ReadAllTextFromFile(ScriptConstants.HostMetadataFileName);
154
+ var hostConfig = string.IsNullOrEmpty(hostJsonContent)
155
+ ? new JObject()
156
+ : JsonConvert.DeserializeObject<JObject>(FileSystemHelpers.ReadAllTextFromFile(ScriptConstants.HostMetadataFileName));
157
if (hostConfig["id"] == null)
158
159
ColoredConsole.Out
0 commit comments