Skip to content

Commit f0a9471

Browse files
Fix luaLibDir not working if directory doesn't exist
1 parent dd44532 commit f0a9471

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Compiler.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ function compile(fileNames: string[], options: CompilerOptions): void {
5757
else {
5858
options.luaLibDir = path.join(options.outDir, options.luaLibDir);
5959
}
60+
if (!fs.existsSync(options.luaLibDir)){
61+
fs.mkdirSync(options.luaLibDir);
62+
}
6063

6164
// Copy lualib to target dir
6265
// This isnt run in sync because copyFileSync wont report errors.

0 commit comments

Comments
 (0)