Skip to content

Commit f785f20

Browse files
committed
Compute basedir at baking time to avoid conflict with basedir API.
1 parent 28ac93d commit f785f20

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/base/container.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
self.name = name
7979
self.filename = name
8080
self.script = _SCRIPT
81-
self.basedir = os.getcwd()
81+
self.cwd = os.getcwd()
8282
self.external = false
8383

8484
for childClass in container.eachChildClass(class) do

src/base/oven.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
-- Specify the workspaces's file system location; when path tokens are
104104
-- expanded in workspace values, they will be made relative to this.
105105

106+
self.basedir = self.basedir or self.cwd
106107
self.location = self.location or self.basedir
107108
context.basedir(self, self.location)
108109

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

242+
self.basedir = self.basedir or self.cwd
241243
self.location = self.location or self.basedir
242244
context.basedir(self, self.location)
243245

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

322+
self.basedir = self.basedir or self.cwd
320323
self.location = self.location or self.basedir
321324
context.basedir(self, self.location)
322325
end

0 commit comments

Comments
 (0)