Skip to content

Commit 13f50af

Browse files
authored
Fixed Exception caused by Empty Lines in config file. (#1099)
1 parent 91a1654 commit 13f50af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clients/cloud/csharp/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Confluent Inc.
1+
// Copyright 2020 Confluent Inc.
22

33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ static async Task<ClientConfig> LoadConfig(string configPath, string certDir)
3333
try
3434
{
3535
var cloudConfig = (await File.ReadAllLinesAsync(configPath))
36-
.Where(line => !line.StartsWith("#"))
36+
.Where(line => !line.StartsWith("#") && !line.Length.Equals(0))
3737
.ToDictionary(
3838
line => line.Substring(0, line.IndexOf('=')),
3939
line => line.Substring(line.IndexOf('=') + 1));

0 commit comments

Comments
 (0)