Skip to content

Commit

Permalink
Do not skip the first line output of flatpak pin
Browse files Browse the repository at this point in the history
`flatpak` does not output `Pinned patterns:` if the stdout is not a TTY.

```
$ flatpak pin --system
Pinned patterns:
  runtime/org.fedoraproject.Platform/x86_64/f41

$ flatpak pin --system | cat
  runtime/org.fedoraproject.Platform/x86_64/f41
```
  • Loading branch information
latin-1 authored and ripytide committed Jan 7, 2025
1 parent 2d40e4c commit 49fe836
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/backends/flatpak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ impl Backend for Flatpak {
run_command_for_stdout(["flatpak", "pin", "--system"], Perms::Same, false)?;
let sys_explicit_runtimes = sys_explicit_runtimes_out
.lines()
.skip(1)
.map(|x| {
(
x.trim().split('/').nth(1).unwrap().to_owned(),
Expand Down Expand Up @@ -111,7 +110,6 @@ impl Backend for Flatpak {
run_command_for_stdout(["flatpak", "pin", "--user"], Perms::Same, false)?;
let user_explicit_runtimes = user_explicit_runtimes_out
.lines()
.skip(1)
.map(|x| {
(
x.trim().split('/').nth(1).unwrap().to_owned(),
Expand Down

0 comments on commit 49fe836

Please sign in to comment.