diff --git a/semantic-conventions/Setup.hs b/semantic-conventions/Setup.hs index dd41297b..0017ee5b 100644 --- a/semantic-conventions/Setup.hs +++ b/semantic-conventions/Setup.hs @@ -49,7 +49,7 @@ import Distribution.Simple (Args, defaultMainWithHooks, simpleUserHooks) import qualified Distribution.Simple import Distribution.Simple.Setup (BuildFlags) import Distribution.Types.HookedBuildInfo (HookedBuildInfo, emptyHookedBuildInfo) -import System.Directory (createDirectoryIfMissing) +import System.Directory (createDirectoryIfMissing, getCurrentDirectory) import System.FilePath (()) import qualified System.FilePath.Glob as Glob import System.IO (IOMode (WriteMode), hPutStrLn, hSetNewlineMode, noNewlineTranslation, stderr, withFile) @@ -478,6 +478,7 @@ preBuild _ _ = do targetDirectory :: FilePath targetDirectory = "gen/OpenTelemetry/" targetFile = targetDirectory "SemanticConventions.hs" + getCurrentDirectory Prelude.>>= Prelude.error . ("🤪 " ++) yamlFiles <- Glob.globDir1 yamlPattern "." when (List.null yamlFiles) $ fail "no YAML files found" models <-