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
absoluteSymlinksstaticboolean(BETA) If "1", create symlinks with absolute paths instead of relative paths. See EnvironmentVariableNames.RUSH_ABSOLUTE_SYMLINKS
allowUnsupportedNodeVersionstaticboolean(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 .
allowWarningsInSuccessfulBuildstaticboolean(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).
buildCacheCredentialstaticstring | undefined(BETA) Provides a credential for reading from and writing to a remote build cache, if configured. See EnvironmentVariableNames.RUSH_BUILD_CACHE_CREDENTIAL
buildCacheEnabledstaticboolean | undefined(BETA) If set, enables or disables the cloud build cache feature. See EnvironmentVariableNames.RUSH_BUILD_CACHE_ENABLED
buildCacheWriteAllowedstaticboolean | undefined(BETA) If set, enables or disables writing to the cloud build cache. See EnvironmentVariableNames.RUSH_BUILD_CACHE_WRITE_ALLOWED
gitBinaryPathstaticstring | undefined(BETA) Allows the git binary path to be explicitly provided. See EnvironmentVariableNames.RUSH_GIT_BINARY_PATH
pnpmStorePathOverridestaticstring | undefined(BETA) An override for the PNPM store path, if pnpmStore configuration is set to 'path' See EnvironmentVariableNames.RUSH_PNPM_STORE_PATH
rushGlobalFolderOverridestaticstring | undefined(BETA) Overrides the location of the ~/.rush global folder where Rush stores temporary files. See EnvironmentVariableNames.RUSH_GLOBAL_FOLDER
rushTempFolderOverridestaticstring | undefined(BETA) An override for the common/temp folder path.
tarBinaryPathstaticstring | 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.