mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-26 03:07:18 +02:00
Use unwrap everywhere to debug snap
This commit is contained in:
parent
ec3f12635c
commit
42d2704bb7
3 changed files with 6 additions and 6 deletions
|
@ -6,7 +6,7 @@ description: |
|
||||||
A terminal user interface for taskwarrior to manage your tasks efficiently.
|
A terminal user interface for taskwarrior to manage your tasks efficiently.
|
||||||
|
|
||||||
grade: stable
|
grade: stable
|
||||||
confinement: devmode
|
confinement: strict
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
taskwarrior-tui:
|
taskwarrior-tui:
|
||||||
|
|
|
@ -672,9 +672,9 @@ impl TTApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = task.output()?;
|
let output = task.output().unwrap();
|
||||||
let data = String::from_utf8(output.stdout)?;
|
let data = String::from_utf8(output.stdout).unwrap();
|
||||||
let error = String::from_utf8(output.stderr)?;
|
let error = String::from_utf8(output.stderr).unwrap();
|
||||||
if !error.contains("The expression could not be evaluated.") {
|
if !error.contains("The expression could not be evaluated.") {
|
||||||
let imported = import(data.as_bytes())?;
|
let imported = import(data.as_bytes())?;
|
||||||
*(self.tasks.lock().unwrap()) = imported;
|
*(self.tasks.lock().unwrap()) = imported;
|
||||||
|
|
|
@ -96,9 +96,9 @@ impl Config {
|
||||||
|
|
||||||
fn get_color_collection() -> Result<HashMap<String, TColor>, Box<dyn Error>> {
|
fn get_color_collection() -> Result<HashMap<String, TColor>, Box<dyn Error>> {
|
||||||
let mut color_collection = HashMap::new();
|
let mut color_collection = HashMap::new();
|
||||||
let output = Command::new("task").arg("rc.color=off").arg("show").output()?;
|
let output = Command::new("task").arg("rc.color=off").arg("show").output().unwrap();
|
||||||
|
|
||||||
let data = String::from_utf8(output.stdout).expect("Unable to convert stdout to string");
|
let data = String::from_utf8(output.stdout).unwrap();
|
||||||
for line in data.split('\n') {
|
for line in data.split('\n') {
|
||||||
if line.starts_with("color.") {
|
if line.starts_with("color.") {
|
||||||
let mut i = line.split(' ');
|
let mut i = line.split(' ');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue