From 6f1a8843beb0fd4cdef0002e3ba450f0eb36eb9f Mon Sep 17 00:00:00 2001 From: Jim Pudar Date: Tue, 7 Jan 2020 16:31:26 -0500 Subject: [PATCH] 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_`. --- lib/inject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/inject.js b/lib/inject.js index aced0fcf..876e1b75 100644 --- a/lib/inject.js +++ b/lib/inject.js @@ -67,7 +67,7 @@ function moveModuleUp(source, target, module) { file => file.startsWith(module + '/') || file.startsWith('serverless_sdk/') || - file.match(/s_.*\.py/) !== null + file.match(/^s_.*\.py/) !== null ) ) .map(srcZipObj =>