RoadmapShopEvents
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 EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS
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 EnvironmentVariableNames.RUSH_ALLOW_UNSUPPORTED_NODEJS.

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 EnvironmentVariableNames.RUSH_BUILD_CACHE_CREDENTIAL
buildCacheEnabled

static

readonly

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

static

readonly

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

static

readonly

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

static

readonly

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

static

readonly

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

static

readonly

string | undefined(BETA) Overrides the location of the ~/.rush global folder where Rush stores temporary files. See EnvironmentVariableNames.RUSH_GLOBAL_FOLDER
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 EnvironmentVariableNames.RUSH_TAR_BINARY_PATH

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.