Skip to content

Commit 69522d3

Browse files
committed
Added extra check for empty token.txt file for docker instances
1 parent ca39781 commit 69522d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HomeAutio.Mqtt.Ecobee/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private static async Task ValidateTokens()
144144
registrationConfig.GetValue<string>("ecobeeAppKey"),
145145
ReadTokenFileAsync,
146146
WriteTokenFileAsync);
147-
if (!File.Exists(@"token.txt"))
147+
if (!File.Exists(@"token.txt") || File.ReadAllText(@"token.txt") == string.Empty)
148148
{
149149
Console.WriteLine("Getting new tokens");
150150
var pin = await registrationClient.GetPinAsync();

0 commit comments

Comments
 (0)