Skip to content

Commit

Permalink
use raw text as command result
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Oct 14, 2024
1 parent dc6657b commit 88a07b9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/routes/dev/command_line_interface.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'dart:convert';
import 'dart:io';

import 'package:c_breez/routes/dev/widget/command_list.dart';
Expand Down Expand Up @@ -158,8 +157,6 @@ class _CommandLineInterfaceState extends State<CommandLineInterface> {
_lastCommand = command;
isLoading = true;
});
// TODO: Style the response output from SDK
const JsonEncoder encoder = JsonEncoder.withIndent(' ');
try {
var commandArgs = command.split(RegExp(r"\s"));
if (commandArgs.isEmpty) {
Expand All @@ -182,9 +179,7 @@ class _CommandLineInterfaceState extends State<CommandLineInterface> {
case 'stop':
final command = commandArgs[0].toLowerCase();
_log.info("executing command: $command");
final answer = await _breezSDK.executeCommand(command: command);
_log.info("Received answer: $answer");
reply = encoder.convert(answer);
reply = await _breezSDK.executeCommand(command: command);
_log.info("Reply: $reply");
break;
default:
Expand Down

0 comments on commit 88a07b9

Please sign in to comment.