Skip to content

Commit 068ca99

Browse files
committed
Ensure no python autogen if src dir missing
1 parent a7a14e3 commit 068ca99

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/scripts/generate-wrappers.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,11 @@ function createJavascriptFiles() {
925925

926926
function createPythonFiles() {
927927

928+
// Prevent python file generation when outside dir (e.g. npm install in dependent)
929+
if (!fs.existsSync(pySrcDir)) {
930+
return Promise.resolve();
931+
}
932+
928933
return mapPromiseFnOverThreeModules(function(relativePath) {
929934
createPythonWrapper(relativePath);
930935
// ensures each dir has empty __init__.py file for proper importing of sub dirs

0 commit comments

Comments
 (0)