Skip to content

Commit

Permalink
Reuse Distribution.Utils.String (trim)
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Dec 9, 2024
1 parent 5f6822d commit 75b4472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cabal/src/Distribution/Simple/Configure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ import Distribution.Types.MissingDependencyReason (MissingDependencyReason (..))
import Distribution.Types.PackageVersionConstraint
import Distribution.Utils.LogProgress
import Distribution.Utils.NubList
import Distribution.Utils.String (trim)
import Distribution.Verbosity
import Distribution.Version

Expand Down Expand Up @@ -2397,7 +2398,6 @@ configurePkgconfigPackages verbosity pkg_descr progdb enabled
pkgconfig ["--modversion", pkg]
`catchIO` (\_ -> dieWithException verbosity $ PkgConfigNotFound pkg versionRequirement)
`catchExit` (\_ -> dieWithException verbosity $ PkgConfigNotFound pkg versionRequirement)
let trim = dropWhile isSpace . dropWhileEnd isSpace
let v = PkgconfigVersion (toUTF8BS $ trim version)
if not (withinPkgconfigVersionRange v range)
then dieWithException verbosity $ BadVersion pkg versionRequirement v
Expand Down

0 comments on commit 75b4472

Please sign in to comment.