diff --git a/common/changes/@microsoft/rush/rush-sdk-env_2023-02-10-23-15.json b/common/changes/@microsoft/rush/rush-sdk-env_2023-02-10-23-15.json index 78282f100e6..12dfee64831 100644 --- a/common/changes/@microsoft/rush/rush-sdk-env_2023-02-10-23-15.json +++ b/common/changes/@microsoft/rush/rush-sdk-env_2023-02-10-23-15.json @@ -2,7 +2,7 @@ "changes": [ { "packageName": "@microsoft/rush", - "comment": "Add code path to @rushstack/rush-sdk for using the @microsoft/rush-lib version from a parent process.", + "comment": "Add code path to @rushstack/rush-sdk for inheriting @microsoft/rush-lib location from a parent process via the RUSH_LIB_PATH environment variable.", "type": "none" } ], diff --git a/libraries/rush-lib/src/api/EnvironmentConfiguration.ts b/libraries/rush-lib/src/api/EnvironmentConfiguration.ts index 4ffab64b8e5..639e64b6e80 100644 --- a/libraries/rush-lib/src/api/EnvironmentConfiguration.ts +++ b/libraries/rush-lib/src/api/EnvironmentConfiguration.ts @@ -154,7 +154,7 @@ export enum EnvironmentVariableNames { RUSH_TAR_BINARY_PATH = 'RUSH_TAR_BINARY_PATH', /** - * Explicitly specifies the path for the version of `\@microsoft/rush-lib` being executed. + * Explicitly specifies the path for the version of `@microsoft/rush-lib` being executed. * Will be set upon loading Rush. */ RUSH_LIB_PATH = 'RUSH_LIB_PATH', diff --git a/libraries/rush-sdk/README.md b/libraries/rush-sdk/README.md index 11874b94af5..1cdb6b7e5c7 100644 --- a/libraries/rush-sdk/README.md +++ b/libraries/rush-sdk/README.md @@ -10,7 +10,7 @@ The **@rushstack/rush-sdk** package acts as a lightweight proxy for accessing th 2. When authoring unit tests for a Rush plugin, developers should add **@microsoft/rush-lib** to their **package.json** `devDependencies`. In this context, **@rushstack/rush-sdk** will resolve to that instance for testing purposes. -3. For projects within a monorepo that use **@rushstack/rush-sdk** during their build process, child processes will use the version of Rush that invoked them. +3. For projects within a monorepo that use **@rushstack/rush-sdk** during their build process, child processes will inherit the installation of Rush that invoked them. This is communicated using the `RUSH_LIB_PATH` environment variable. 4. For scripts and tools that are designed to be used in a Rush monorepo, in the future **@rushstack/rush-sdk** will automatically invoke **install-run-rush.js** and load the local installation. This ensures that tools load a compatible version of the Rush engine for the given branch. Once this is implemented, **@rushstack/rush-sdk** can replace **@microsoft/rush-lib** entirely as the official API interface, with the latter serving as the underlying implementation. diff --git a/libraries/rush-sdk/src/index.ts b/libraries/rush-sdk/src/index.ts index fff0233b61b..0407765841e 100644 --- a/libraries/rush-sdk/src/index.ts +++ b/libraries/rush-sdk/src/index.ts @@ -104,7 +104,8 @@ if (rushLibModule === undefined) { try { rushLibModule = _require(rushLibPath); } catch (error) { - terminal.writeVerboseLine(`Filed to load ${RUSH_LIB_NAME} via process.env.${rushLibVariable}`); + // Log this as a warning, since it is unexpected to define an incorrect value of the variable. + terminal.writeWarningLine(`Failed to load ${RUSH_LIB_NAME} via process.env.${rushLibVariable}`); } if (rushLibModule !== undefined) {