summary refs log tree commit diff
path: root/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh')
-rwxr-xr-xmaintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
index c49ea68fbfb..9e243052f25 100755
--- a/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
+++ b/maintainers/scripts/haskell/upload-nixos-package-list-to-hackage.sh
@@ -12,10 +12,10 @@
 # ~/.cabal/config file.
 
 # e.g. username: maralorn
-#      password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression.)
+#      password-command: pass hackage.haskell.org (this can be any command, but not an arbitrary shell expression. Like cabal we only read the first output line and ignore the rest.)
 # Those fields are specified under `upload` on the `cabal` man page.
 
 package_list="$(nix-build -A haskell.package-list)/nixos-hackage-packages.csv"
 username=$(grep "^username:" ~/.cabal/config | sed "s/^username: //")
 password_command=$(grep "^password-command:" ~/.cabal/config | sed "s/^password-command: //")
-curl -u "$username:$($password_command)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv
+curl -u "$username:$($password_command | head -n1)" --digest -H "Content-type: text/csv" -T "$package_list" http://hackage.haskell.org/distro/NixOS/packages.csv