Skip to content

Commit 6f1a884

Browse files
Jim PudarJim Pudar
Jim Pudar
authored and
Jim Pudar
committed
Correct imprecise regex in moveModuleUp function (fixes #444)
The existing regex had the side effect of matching python files from other modules if their filename or path happened to contain the string `s_`.
1 parent 64e20db commit 6f1a884

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/inject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function moveModuleUp(source, target, module) {
6767
file =>
6868
file.startsWith(module + '/') ||
6969
file.startsWith('serverless_sdk/') ||
70-
file.match(/s_.*\.py/) !== null
70+
file.match(/^s_.*\.py/) !== null
7171
)
7272
)
7373
.map(srcZipObj =>

0 commit comments

Comments
 (0)