fix(core): bring back setWorkspaceRoot util (#18811)

This commit is contained in:
James Henry 2023-08-24 15:46:40 +04:00 committed by GitHub
parent 138ffd6205
commit a146fcc690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,11 @@ import { fileExists } from './fileutils';
*/
export let workspaceRoot = workspaceRootInner(process.cwd(), process.cwd());
// Required for integration tests in projects which depend on Nx at runtime, such as lerna and angular-eslint
export function setWorkspaceRoot(root: string): void {
workspaceRoot = root;
}
export function workspaceRootInner(
dir: string,
candidateRoot: string | null