@@ -5946,6 +5946,7 @@ dependencies = [
"clap 4.3.21",
"colored",
"darkfi",
+ "libc",
"libsqlite3-sys",
"log",
"prettytable-rs",
@@ -9,6 +9,7 @@ homepage = "https://dark.fi"
repository = "https://github.com/darkrenaissance/darkfi"
[dependencies]
+libc = "0.2.147"
darkfi = { path = "../../../", features = ["rpc"]}
# Async
@@ -117,8 +117,18 @@ pub fn print_task_list(tasks: Vec<TaskInfo>, ws: String) -> Result<()> {
.build(),
);
- ws_table.printstd();
- table.printstd();
+ if unsafe { libc::isatty(libc::STDOUT_FILENO) } == 1 {
+ ws_table.printstd();
+ table.printstd();
+ } else {
+ for row in table.row_iter() {
+ for cell in row.iter() {
+ print!("{}\t", cell.get_content());
+ }
+ print!("\n");
+
Ok(())
}