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;
|
||||
}
|
||||
|
||||
const directory = getFileName(name);
|
||||
options.name = getFileName(name);
|
||||
const directory = options.name;
|
||||
|
||||
const args = unparse({
|
||||
...options,
|
||||
@ -40,7 +41,7 @@ export async function createEmptyWorkspace<T extends CreateWorkspaceOptions>(
|
||||
|
||||
const pmc = getPackageManagerCommand(packageManager);
|
||||
|
||||
const command = `new ${directory} ${args}`;
|
||||
const command = `new ${args}`;
|
||||
|
||||
const workingDir = process.cwd().replace(/\\/g, '/');
|
||||
let nxWorkspaceRoot = `"${workingDir}"`;
|
||||
|
||||
@ -120,7 +120,7 @@ function normalizeOptions(options: Schema): NormalizedSchema {
|
||||
|
||||
normalized.name = names(options.name).fileName;
|
||||
if (!options.directory) {
|
||||
normalized.directory = options.name;
|
||||
normalized.directory = normalized.name;
|
||||
}
|
||||
|
||||
const parsed = parsePresetName(options.preset);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user