Skip to content

Commit

Permalink
Merge pull request #539 from WildernessLabs/runtime_validation
Browse files Browse the repository at this point in the history
Better messaging if runtime enable/disable fails
  • Loading branch information
adrianstevens committed Mar 19, 2024
2 parents 96f17fa + 717097a commit a0555f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ protected override async ValueTask ExecuteCommand()

state = await device.IsRuntimeEnabled(CancellationToken);

if (state == true)
{
throw new CommandException("Failed to disable runtime");
}

Logger?.LogInformation($"Runtime is {(state ? "ENABLED" : "DISABLED")}");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ protected override async ValueTask ExecuteCommand()

state = await device.IsRuntimeEnabled(CancellationToken);

if (state == false)
{
throw new CommandException("Failed to enable runtime");
}

Logger?.LogInformation($"Runtime is {(state ? "ENABLED" : "DISABLED")}");
}
}
Expand Down

0 comments on commit a0555f5

Please sign in to comment.