Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > EnvironmentConfiguration

EnvironmentConfiguration class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Provides Rush-specific environment variable data. All Rush environment variables must start with "RUSH_". This class is designed to be used by RushConfiguration.

Signature:

export declare class EnvironmentConfiguration 

Remarks

Initialize will throw if any unknown parameters are present.

Properties

PropertyModifiersTypeDescription
absoluteSymlinks

static

readonly

boolean(BETA) If "1", create symlinks with absolute paths instead of relative paths. See
allowUnsupportedNodeVersion

static

readonly

boolean

(BETA) If this environment variable is set to "1", the Node.js version check will print a warning instead of causing a hard error if the environment's Node.js version doesn't match the version specifier in rush.json's "nodeSupportedVersionRange" property.

See .

allowWarningsInSuccessfulBuild

static

readonly

boolean(BETA) Setting this environment variable overrides the value of allowWarningsInSuccessfulBuild in the command-line.json configuration file. Specify 1 to allow warnings in a successful build, or 0 to disallow them. (See the comments in the command-line.json file for more information).
buildCacheCredential

static

readonly

string | undefined(BETA) Provides a credential for reading from and writing to a remote build cache, if configured. See
buildCacheEnabled

static

readonly

boolean | undefined(BETA) If set, enables or disables the cloud build cache feature. See
buildCacheWriteAllowed

static

readonly

boolean | undefined(BETA) If set, enables or disables writing to the cloud build cache. See
gitBinaryPath

static

readonly

string | undefined(BETA) Allows the git binary path to be explicitly provided. See
pnpmStorePathOverride

static

readonly

string | undefined(BETA) An override for the PNPM store path, if pnpmStore configuration is set to 'path' See
pnpmVerifyStoreIntegrity

static

readonly

boolean | undefined(BETA) If specified, enables or disables integrity verification of the pnpm store during install. See
rushGlobalFolderOverride

static

readonly

string | undefined(BETA) Overrides the location of the ~/.rush global folder where Rush stores temporary files. See
rushTempFolderOverride

static

readonly

string | undefined(BETA) An override for the common/temp folder path.
tarBinaryPath

static

readonly

string | undefined(BETA) Allows the tar binary path to be explicitly provided. See

Methods

MethodModifiersDescription
parseBooleanEnvironmentVariable(name, value)static(BETA)
reset()static(BETA) Resets EnvironmentConfiguration into an un-initialized state.
validate(options)static(BETA) Reads and validates environment variables. If any are invalid, this function will throw.