Fix root file link override
This commit is contained in:
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -10,8 +10,8 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/src/Alma/bin/Debug/net7.0/Alma.dll",
|
||||
"args": [],
|
||||
"program": "${workspaceFolder}/src/Alma/bin/Debug/net8.0/Alma.dll",
|
||||
"args": ["link", "dotconfig", "git", "-d"],
|
||||
"cwd": "${workspaceFolder}/src/Alma",
|
||||
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||
"console": "internalConsole",
|
||||
|
||||
@@ -201,7 +201,14 @@ public class LinkCommand : RepositoryModuleCommandBase
|
||||
var filesToLink = new List<ItemToLink>();
|
||||
foreach (var file in currentDirectory.GetFiles())
|
||||
{
|
||||
filesToLink.Add(new ItemToLink(Path.Combine(currentDirectory.FullName, file.Name), Path.Combine(currentTargetDirectory.FullName, file.Name)));
|
||||
if (moduleConfiguration?.Links?.ContainsKey(file.Name) ?? false)
|
||||
{
|
||||
filesToLink.Add(new ItemToLink(file.FullName, _pathHelperService.ResolvePath(moduleConfiguration.Links[file.Name], targetDirectory.FullName)));
|
||||
}
|
||||
else
|
||||
{
|
||||
filesToLink.Add(new ItemToLink(file.FullName, Path.Combine(currentTargetDirectory.FullName, file.Name)));
|
||||
}
|
||||
}
|
||||
|
||||
var subDirLinksToAdd = Enumerable.Empty<ItemToLink>();
|
||||
|
||||
Reference in New Issue
Block a user