fix(misc): ensure workspace directory is normalized correctly (#16855)
This commit is contained in:
parent
318b1cf584
commit
cc9e650cd8
@ -32,7 +32,8 @@ export async function createEmptyWorkspace<T extends CreateWorkspaceOptions>(
|
|||||||
options.packageManager = packageManager;
|
options.packageManager = packageManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
const directory = getFileName(name);
|
options.name = getFileName(name);
|
||||||
|
const directory = options.name;
|
||||||
|
|
||||||
const args = unparse({
|
const args = unparse({
|
||||||
...options,
|
...options,
|
||||||
@ -40,7 +41,7 @@ export async function createEmptyWorkspace<T extends CreateWorkspaceOptions>(
|
|||||||
|
|
||||||
const pmc = getPackageManagerCommand(packageManager);
|
const pmc = getPackageManagerCommand(packageManager);
|
||||||
|
|
||||||
const command = `new ${directory} ${args}`;
|
const command = `new ${args}`;
|
||||||
|
|
||||||
const workingDir = process.cwd().replace(/\\/g, '/');
|
const workingDir = process.cwd().replace(/\\/g, '/');
|
||||||
let nxWorkspaceRoot = `"${workingDir}"`;
|
let nxWorkspaceRoot = `"${workingDir}"`;
|
||||||
|
|||||||
@ -120,7 +120,7 @@ function normalizeOptions(options: Schema): NormalizedSchema {
|
|||||||
|
|
||||||
normalized.name = names(options.name).fileName;
|
normalized.name = names(options.name).fileName;
|
||||||
if (!options.directory) {
|
if (!options.directory) {
|
||||||
normalized.directory = options.name;
|
normalized.directory = normalized.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
const parsed = parsePresetName(options.preset);
|
const parsed = parsePresetName(options.preset);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user