Skip to content

Commit

Permalink
Merge pull request #91 from chickensoft-games/fix/addon-symlink-relat…
Browse files Browse the repository at this point in the history
…ive-paths

fix: addon symlink relative paths
  • Loading branch information
jolexxa authored Dec 29, 2024
2 parents f15a9ba + d55923b commit b4f49a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addons/
GodotEnv/bin
GodotEnv/obj
GodotEnv/nupkg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public async Task EndsInCannotBeResolvedIfFatalErrorEncountered() {
projectPath, out addonsFilePath, null
)).Returns(addonsFile);

addonsRepo.Setup(repo => repo.ResolveUrl(entry, addonsFilePath))
addonsRepo.Setup(repo => repo.ResolveUrl(entry, projectPath))
.Returns(entry.Url);

var addon = entry.ToAddon(
Expand Down Expand Up @@ -149,7 +149,7 @@ public async Task DeterminesCanonicalAddonCorrectly() {
projectPath, out addonsFilePath, null
)).Returns(addonsFile);

addonsRepo.Setup(repo => repo.ResolveUrl(entry, addonsFilePath))
addonsRepo.Setup(repo => repo.ResolveUrl(entry, projectPath))
.Returns(entry.Url);

var addon = entry.ToAddon(
Expand Down Expand Up @@ -256,7 +256,7 @@ public async Task InstallsSymlinkAddon() {
projectPath, out addonsFilePath, null
)).Returns(addonsFile);

addonsRepo.Setup(repo => repo.ResolveUrl(entry, addonsFilePath))
addonsRepo.Setup(repo => repo.ResolveUrl(entry, projectPath))
.Returns(entry.Url);

var addon = entry.ToAddon(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public async Task<Result> Install(
// Resolve addon's url. For remote addons, the url is unchanged.
// For local symlink addons, the actual path is resolved.
// For normal local addons, the path is fully qualified.
var url = AddonsRepo.ResolveUrl(addonEntry, addonsFilePath);
var url = AddonsRepo.ResolveUrl(addonEntry, path);

// Converts the addon entry in an addons.json file to an addon model
// that contains additional information about the addon, like its
Expand Down

0 comments on commit b4f49a6

Please sign in to comment.