Skip to content

Commit

Permalink
fix(list): remove extra newline at end of output
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed May 10, 2024
1 parent ba7876e commit 7d81dad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/cli/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ pub fn handle(package_paths: impl Iterator<Item = PathBuf>) -> bool {
if let Ok(Ok(package)) =
fs::read(&package_path).map(|mut raw| simd_json::from_slice::<PackageJson>(&mut raw))
{
if found_package {
println!();
}

print!("{}", package.make_prefix(None, Stream::Stdout));
found_package = true;

Expand All @@ -20,8 +24,6 @@ pub fn handle(package_paths: impl Iterator<Item = PathBuf>) -> bool {
);
println!(" {script_content}");
}

println!();
}
}

Expand Down
1 change: 0 additions & 1 deletion tests/default/list.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ args = []
stdout = """
dev
echo dev
"""
stderr = ""
1 change: 0 additions & 1 deletion tests/list/basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ args = ["list"]
stdout = """
dev
echo dev
"""
stderr = ""
1 change: 0 additions & 1 deletion tests/list/with_info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ stdout = """
@nrr/testing@0.1.0
dev
echo dev
"""
stderr = ""

0 comments on commit 7d81dad

Please sign in to comment.