From 3b28e60c51332a342243750c01224d069f5ce56a Mon Sep 17 00:00:00 2001 From: Kazuki Okamoto Date: Fri, 29 Mar 2024 16:39:25 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- semantic-conventions/Setup.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 <-