From e2cfff1a3a07f01a884775d3473c70639c684aae Mon Sep 17 00:00:00 2001 From: Lucy Cifferello <12953208+elvece@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:24:08 -0400 Subject: [PATCH] fix param parsing --- src/Cli/Cli.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cli/Cli.hs b/src/Cli/Cli.hs index 698ea22..a692d16 100644 --- a/src/Cli/Cli.hs +++ b/src/Cli/Cli.hs @@ -53,7 +53,7 @@ import Data.HashMap.Internal.Strict ( import Data.String.Interpolate.IsString ( i, ) -import Data.Text (toLower, splitOn) +import Data.Text (toLower, splitOn, unpack) import Dhall ( Encoder (embed), FromDhall (..), @@ -528,10 +528,10 @@ upload (Upload name mpkg shouldIndex arches) = do for_ pkgs $ \f -> $logWarn (fromString f) exitWith $ ExitFailure 1 Just s -> pure s + putChunkLn $ fromString ("Checking authorization...") & fore green let pkgId_ = head $ splitOn "." $ last $ splitOn "/" $ show pkg - putChunkLn $ fromString ("Checking permissions...") & fore green pkgAuthBody <- - parseRequest ("POST " <> show publishCfgRepoLocation <> "/admin/v0/auth/" <> show pkgId_) + parseRequest ("POST " <> show publishCfgRepoLocation <> "/admin/v0/auth/" <> unpack pkgId_) <&> setRequestHeaders [("accept", "text/plain")] <&> setRequestResponseTimeout (responseTimeoutMicro (90_000_000)) <&> applyBasicAuth (B8.pack publishCfgRepoUser) (B8.pack publishCfgRepoPass)