Skip to content

Commit

Permalink
Compute basedir at baking time to avoid conflict with basedir API.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Oct 16, 2024
1 parent 28ac93d commit f785f20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/container.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
self.name = name
self.filename = name
self.script = _SCRIPT
self.basedir = os.getcwd()
self.cwd = os.getcwd()
self.external = false

for childClass in container.eachChildClass(class) do
Expand Down
3 changes: 3 additions & 0 deletions src/base/oven.lua
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
-- Specify the workspaces's file system location; when path tokens are
-- expanded in workspace values, they will be made relative to this.

self.basedir = self.basedir or self.cwd
self.location = self.location or self.basedir
context.basedir(self, self.location)

Expand Down Expand Up @@ -238,6 +239,7 @@
-- location. Any path tokens which are expanded in non-path fields
-- are made relative to this, ensuring a portable generated project.

self.basedir = self.basedir or self.cwd
self.location = self.location or self.basedir
context.basedir(self, self.location)

Expand Down Expand Up @@ -317,6 +319,7 @@
-- location. Any path tokens which are expanded in non-path fields
-- are made relative to this, ensuring a portable generated rule.

self.basedir = self.basedir or self.cwd
self.location = self.location or self.basedir
context.basedir(self, self.location)
end
Expand Down

0 comments on commit f785f20

Please sign in to comment.