Skip to content

Commit 87c4562

Browse files
committed
Make internal paths configurable in the REPL.
1 parent 08f2411 commit 87c4562

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Sources/LispKitTools/LispKitRepl.swift

+11-7
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,9 @@ open class LispKitRepl {
211211
return false
212212
}
213213
}
214-
// Inject root directories if provided via a command-line argument
215-
for root in self.roots.value {
216-
guard self.setupBinaryBundle(root: URL(fileURLWithPath: root, isDirectory: true)) else {
217-
return false
218-
}
219-
}
220214
// Set up remaining file paths
221-
return self.setupPaths() &&
215+
return self.setupRootPaths() &&
216+
self.setupPaths() &&
222217
self.bootstrapContext() &&
223218
self.importLibraries(initialLibraries) &&
224219
self.loadPrelude()
@@ -237,6 +232,15 @@ open class LispKitRepl {
237232
return true
238233
}
239234

235+
open func setupRootPaths() -> Bool {
236+
for root in self.roots.value {
237+
guard self.setupBinaryBundle(root: URL(fileURLWithPath: root, isDirectory: true)) else {
238+
return false
239+
}
240+
}
241+
return true
242+
}
243+
240244
open func setupPaths() -> Bool {
241245
if let context = self.context {
242246
for p in self.filePaths.value {

0 commit comments

Comments
 (0)