We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e97f5d2 commit f79b6b8Copy full SHA for f79b6b8
src/utils/parseNameAndPath.ts
@@ -1,3 +1,5 @@
1
+import pathModule from "path";
2
+
3
/**
4
* Parses the appName and its path from the user input.
5
* Returns an array of [appName, path] where appName is the name put in the package.json and
@@ -15,7 +17,8 @@ export const parseNameAndPath = (input: string) => {
15
17
16
18
// If the user ran `npx create-t3-app .` or similar, the appName should be the current directory
19
if (appName === ".") {
- appName = process.cwd().split("/").pop();
20
+ const parsedCwd = pathModule.resolve(process.cwd());
21
+ appName = pathModule.basename(parsedCwd);
22
}
23
24
// If the first part is a @, it's a scoped package
0 commit comments