Skip to content

Commit

Permalink
fix: #16 🐛 Ensure debug feature is working
Browse files Browse the repository at this point in the history
  • Loading branch information
ddanier committed May 1, 2024
1 parent 520a27a commit 9a865d7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions nurfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ def "nur test-nur" [] {
cargo run -- --quiet run-all
}

# Run one task for all enabled features to see those compile
def "nur test-features" [] {
open Cargo.toml | get features | transpose key value | get key | each {
|it|
print $"Running 'nur hello ($it)' to check feature ($it)"
cargo run -F $it -- --quiet hello $it
}
}

# Run linter (clippy)
def --wrapped "nur lint" [
...args
Expand All @@ -68,6 +77,8 @@ def "nur qa" [] {
nur test
print "Running nur tests"
nur test-nur
print "Running feature tests"
nur test-features
print "Running clippy linter"
nur lint
print "Running cargo check"
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ fn main() -> Result<ExitCode, miette::ErrReport> {
}
#[cfg(feature = "debug")]
if parsed_nur_args.debug_output {
eprintln!("full task name: {}", nur_engine.state.task_name.unwrap());
eprintln!(
"full task name: {}",
nur_engine.state.task_name.clone().unwrap()
);
}

// Handle help
Expand Down

0 comments on commit 9a865d7

Please sign in to comment.