Skip to content

Commit

Permalink
fix(windows): fix auth input error (#48)
Browse files Browse the repository at this point in the history
Would always return a 403 because \r was included
  • Loading branch information
hugo-vrijswijk authored Sep 19, 2023
1 parent 85d9d62 commit 57b00f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Auth.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ final class Auth(tgtg: TooGoodToGo, config: AuthConfig)(using log: Logger[IO]):

// Weird summon is needed for scala-js cross-compilation issues
def readLine: IO[String] = stdinUtf8[IO](4096)(summon[Async[IO]])
.repartition(s => Chunk.array(s.split("\n", -1)))
.through(text.lines)
.map(_.strip())
.filter(_.nonEmpty)
.head
.compile
Expand Down

0 comments on commit 57b00f2

Please sign in to comment.