1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Resolve project path string

This commit is contained in:
Yuvan Wickramasinghe 2025-05-13 18:00:31 -07:00
parent aa46ebadb7
commit 9a2e5d70a3
No known key found for this signature in database

View file

@ -3248,23 +3248,6 @@ namespace IDE
public Result<Project, ProjectAddError> AddProject(StringView projectName, VerSpec verSpec)
{
VerSpec useVerSpec = verSpec;
switch (useVerSpec)
{
case .None:
case .SemVer(let ver):
String unresolvedVersion = scope String(ver.mVersion);
case .Path(let path):
String unresolvedPath = scope String(path);
case .Git(let url, let ver):
String unresolvedUrl = scope String(url);
String unresolvedVersion = scope String(ver.mVersion);
}
String verConfigDir = mWorkspace.mDir;
if (let project = mWorkspace.FindProject(projectName))
@ -3339,7 +3322,13 @@ namespace IDE
switch (useVerSpec)
{
case .Path(let path):
var relPath = scope String(path);
Project.Options options = GetCurProjectOptions(project);
Workspace.Options workspaceOptions = GetCurWorkspaceOptions();
var resolvedPath = scope String();
ResolveConfigString(mPlatformName, workspaceOptions, project, options, path, "project path", resolvedPath);
var relPath = scope String(resolvedPath);
IDEUtils.FixFilePath(relPath);
if (!relPath.EndsWith(IDEUtils.cNativeSlash))
relPath.Append(IDEUtils.cNativeSlash);