Skip to content

Commit 41baa62

Browse files
committed
Bootstrap: Handle stream closed while importing content
1 parent 8fc2a96 commit 41baa62

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Bootstrap/BootstrapProcess.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@ public ExitCode Execute(IEnumerable<string> args)
3232
SaveConfig();
3333
TrustKeys();
3434

35-
ImportEmbedded();
36-
ImportDirectory();
35+
try
36+
{
37+
ImportEmbedded();
38+
ImportDirectory();
39+
}
40+
#region Error handling
41+
catch (ObjectDisposedException ex)
42+
{
43+
Log.Warn("Stream closed while importing content", ex);
44+
return ExitCode.IOError;
45+
}
46+
#endregion
3747

3848
if (BootstrapConfig.Instance.AppUri == null) ApplySharedOptions();
3949
if (_offline) Config.NetworkUse = NetworkLevel.Offline;

0 commit comments

Comments
 (0)