docs: add docs for .cpprc

This commit is contained in:
Amin Yahyaabadi 2022-03-01 03:04:33 -08:00
parent f052b759d1
commit 4ac3c87bd8
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -227,12 +227,12 @@ export async function main(args: string[]): Promise<number> {
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: {