From 4ac3c87bd867c01db364f3afed06d5f71dfc5867 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 1 Mar 2022 03:04:33 -0800 Subject: [PATCH] docs: add docs for .cpprc --- README.md | 7 ++++--- src/main.ts | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 82ccec78..fb437b8c 100644 --- a/README.md +++ b/README.md @@ -82,10 +82,11 @@ sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --v source ~/.cpprc # activate cpp enviroment variables ``` -NOTE: In the `compiler` entry, you can specify the version after `-` like `llvm-11.0.0`. -For the tools, instead of `true` that chooses the default version, you can pass a specific version. +NOTE: In the `compiler` entry, you can specify the version after `-` like `llvm-11.0.0`. For the tools, you can pass a specific version instead of `true` that chooses the default version -NOTE: you will not need `sudo` if you are already a root user (e.g., in a GitLab runner). +NOTE: On Unix systems, when `setup-cpp` is used locally or in other CI services like GitLab, the environment variables are added to `~/.cpprc`. You should run `source ~/.cpprc` to immediately activate the environment variables. This file is automatically sourced in the next shell restart from `~/.bashrc` or `~/.profile` if `SOURCE_CPPRC` is not set to `0`. + +NOTE: On Unix systems, you will not need `sudo` if you are already a root user (e.g., in a GitLab runner or Docker). ### With Nodejs diff --git a/src/main.ts b/src/main.ts index beae578b..049085ff 100644 --- a/src/main.ts +++ b/src/main.ts @@ -227,12 +227,12 @@ export async function main(args: string[]): Promise { if (!isGitHubCI()) { switch (process.platform) { case "win32": { - core.info("Run `RefreshEnv.cmd` or restart your shell to update the environment.") + warning("Run `RefreshEnv.cmd` or restart your shell to update the environment.") break } case "linux": case "darwin": { - core.info("Run `source ~/.cpprc` or restart your shell to update the environment.") + warning("Run `source ~/.cpprc` or restart your shell to update the environment.") break } default: {