mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
fix: correctly sanitize project name (#9193)
This commit is contained in:
@ -3,8 +3,14 @@ import { basename } from "path";
|
||||
import { INativeScriptPlatform } from "../helpers/platform";
|
||||
import { getProjectRootPath } from "../helpers/project";
|
||||
|
||||
function sanitizeName(appName: string): string {
|
||||
const sanitizedName = appName.split("").filter((c) =>
|
||||
/[a-zA-Z0-9]/.test(c)
|
||||
).join("");
|
||||
return sanitizedName;
|
||||
}
|
||||
function getDistPath() {
|
||||
const appName = basename(getProjectRootPath());
|
||||
const appName = sanitizeName(basename(getProjectRootPath()));
|
||||
return `platforms/ios/${appName}/app`;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user