From e45b8a94d63ec38872f2cbfb07402aef7c1f0a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 28 Oct 2022 16:22:37 +0200 Subject: [PATCH 1/2] Define CLICOLOR_FORCE=1 env var in CI runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This env var is supported by some tools to force them to emit ANSI escape sequences corresponding to colors even if they detect that they're not running in tty, which is th case for CI jobs. It is going to be supported in Dune 3.6.0, and perhaps other compilers and build systems. Signed-off-by: Antonin Décimo --- CHANGELOG.md | 4 ++++ src/setup-ocaml/constants.ts | 2 ++ src/setup-ocaml/installer.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09877189..403df07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to ## [unreleased] +## Added + +- Define `CLICOLOR_FORCE=1` in CI runs. + ## [2.0.6] ### Added diff --git a/src/setup-ocaml/constants.ts b/src/setup-ocaml/constants.ts index d7f0ff2a..c3a3f821 100644 --- a/src/setup-ocaml/constants.ts +++ b/src/setup-ocaml/constants.ts @@ -82,3 +82,5 @@ const defaultRepository = export const OPAM_REPOSITORIES: [string, string][] = repositories_yaml ? Object.entries(repositories_yaml).reverse() : [["default", defaultRepository]]; + +export const CLICOLOR_FORCE = "1"; diff --git a/src/setup-ocaml/installer.ts b/src/setup-ocaml/installer.ts index f2530bf2..fe201f97 100644 --- a/src/setup-ocaml/installer.ts +++ b/src/setup-ocaml/installer.ts @@ -142,6 +142,7 @@ export async function installer(): Promise { core.exportVariable("DUNE_CACHE", "enabled"); core.exportVariable("DUNE_CACHE_TRANSPORT", "direct"); } + core.exportVariable("CLICOLOR_FORCE", "1"); const fnames = await getOpamLocalPackages(); if (fnames.length > 0) { if (OPAM_PIN) { From a4ba71fccaf9acaba38f31641af98585a1670a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Tue, 8 Nov 2022 13:35:13 +0100 Subject: [PATCH 2/2] pnpm build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antonin Décimo --- dist/index.js | 1 + src/setup-ocaml/constants.ts | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index eb48bb7d..33101d58 100644 --- a/dist/index.js +++ b/dist/index.js @@ -112995,6 +112995,7 @@ async function installer() { lib_core.exportVariable("DUNE_CACHE", "enabled"); lib_core.exportVariable("DUNE_CACHE_TRANSPORT", "direct"); } + lib_core.exportVariable("CLICOLOR_FORCE", "1"); const fnames = await getOpamLocalPackages(); if (fnames.length > 0) { if (OPAM_PIN) { diff --git a/src/setup-ocaml/constants.ts b/src/setup-ocaml/constants.ts index c3a3f821..d7f0ff2a 100644 --- a/src/setup-ocaml/constants.ts +++ b/src/setup-ocaml/constants.ts @@ -82,5 +82,3 @@ const defaultRepository = export const OPAM_REPOSITORIES: [string, string][] = repositories_yaml ? Object.entries(repositories_yaml).reverse() : [["default", defaultRepository]]; - -export const CLICOLOR_FORCE = "1";