Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/cli/src/create/__tests__/discovery.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ describe('expandCreateShorthand', () => {
expect(expandCreateShorthand('/absolute/path')).toBe('/absolute/path');
});

it('should handle scope-only input gracefully', () => {
expect(expandCreateShorthand('@scope')).toBe('@scope');
it('should expand scope-only input to @scope/create', () => {
expect(expandCreateShorthand('@scope')).toBe('@scope/create');
});

it('should handle special cases where default convention does not apply', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/create/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function expandCreateShorthand(templateName: string): string {
if (templateName.startsWith('@')) {
const slashIndex = templateName.indexOf('/');
if (slashIndex === -1) {
return templateName;
return `${templateName}/create`;
Comment thread
fengmk2 marked this conversation as resolved.
Outdated
}
const scope = templateName.slice(0, slashIndex);
const rest = templateName.slice(slashIndex + 1);
Expand Down
Loading