From 32c03b0fc31e692b8c09ef120f3cd0ec5153e6d2 Mon Sep 17 00:00:00 2001 From: Zoe Zuser Date: Sun, 19 May 2024 05:18:44 -0400 Subject: [PATCH] Add comment clarifying disabling check for scripts closes #8963 --- Cabal/src/Distribution/PackageDescription/Check/Target.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cabal/src/Distribution/PackageDescription/Check/Target.hs b/Cabal/src/Distribution/PackageDescription/Check/Target.hs index fdafa89b6e5..cc869617795 100644 --- a/Cabal/src/Distribution/PackageDescription/Check/Target.hs +++ b/Cabal/src/Distribution/PackageDescription/Check/Target.hs @@ -825,9 +825,10 @@ checkGHCOptions title t opts = do checkFlags ["-prof"] (PackageBuildWarning $ OptProf title) - -- Does not apply to scripts. - -- Why do we need this? See #8963. pid <- asksCM (pnPackageId . ccNames) + -- Scripts add the -o flag in the fake-package.cabal in order to have the + -- executable name match the script name even when there are characters + -- in the script name which are illegal to have as a target name. unless (pid == fakePackageId) $ checkFlags ["-o"]