msys2 / msys2-pacman

A friendly fork of https://gitlab.archlinux.org/pacman/pacman
GNU General Public License v2.0
21 stars 12 forks source link

pacman.c: handle cr on stdin as well #5

Closed 1480c1 closed 2 years ago

1480c1 commented 2 years ago

Improves compatibility with Windows targets, specifically when using powershell for string transforming package names and piping into pacman as it's virtually impossible to send newline only terminated strings through pipes

Allows for stuff such as

$a="vim nano"
$b="cmake ninja"
$a.Split(' '), $b.Split(' ').ForEach({Write-Output mingw-w64-ucrt-x86_64-$_}) |
  pacman -S --needed -

Signed-off-by: Christopher Degawa ccom@randomderp.com