Skip to content

Commit 54d8b71

Browse files
authored
Return HostStartSettings if local.settings.json is not loaded (#4629)
1 parent 0faa5fe commit 54d8b71

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Cli/func/Common/SecretsManager.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ public void DeleteSecret(string name)
115115

116116
public HostStartSettings GetHostStartSettings()
117117
{
118-
return Settings.Host ?? new HostStartSettings();
118+
try
119+
{
120+
return Settings?.Host ?? new HostStartSettings();
121+
}
122+
catch (CliException)
123+
{
124+
return new HostStartSettings();
125+
}
119126
}
120127

121128
public void DeleteConnectionString(string name)

0 commit comments

Comments
 (0)