Skip to content

Commit 9a62ef5

Browse files
fenduruarcanis
authored andcommitted
fix(create): invoke correct path when using scoped package (#6271)
* fix(create): invoke correct path when using scoped package When running yarn create, first the package is installed globally, however after installing create was attempting to invoke the binary from within a scope folder that did not exists. The corrects the path resolution to invoke the binary from the actual place it was installed to. fixes #6266 * Update create.js
1 parent 53a6483 commit 9a62ef5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli/commands/create.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg
5656
throw new MessageError(reporter.lang('invalidPackageName'));
5757
}
5858

59-
const {fullName: packageName, scope: packageDir, name: commandName} = coerceCreatePackageName(builderName);
59+
const {fullName: packageName, name: commandName} = coerceCreatePackageName(builderName);
6060
await runGlobal(config, reporter, {}, ['add', packageName]);
6161

6262
const binFolder = await getBinFolder(config, {});
63-
const command = path.resolve(binFolder, packageDir, path.basename(commandName));
63+
const command = path.resolve(binFolder, commandName);
6464

6565
await child.spawn(command, rest, {stdio: `inherit`, shell: true});
6666
}

0 commit comments

Comments
 (0)