Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.

Commit 55c91c4

Browse files
committed
fix package.searchpath not being used in Lua 5.2+
1 parent 0aaedef commit 55c91c4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fixed `package.searchpath` not being used in Lua 5.2+ (instead falling back to our implementation)
13+
1014
### Updated
1115

1216
- Updated to work with latest Yuescript

luapack.yue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ class Writer
3737

3838

3939
searchpath_compat = (name, path) ->
40-
package.searchpath name, path if package.searchpath -- lua 5.2+
41-
sep = ";" -- lua 5.1 didnt have package.config
40+
return package.searchpath name, path if package.searchpath -- lua 5.2+
4241
name = name::gsub "%.", "/" -- a.b.c -> a/b/c
4342
for path in path::gmatch "[^;]+"
4443
p = path::gsub "?", name

0 commit comments

Comments
 (0)