From b75e7b33cc8d3edd0f27eda1a3e7d030c658d84e Mon Sep 17 00:00:00 2001 From: Gal Bashan Date: Tue, 25 Dec 2018 11:58:34 +0200 Subject: [PATCH] fix(wrapper): fixing python handling of pathes with / --- src/handlers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/handlers.js b/src/handlers.js index a420501..c59b508 100644 --- a/src/handlers.js +++ b/src/handlers.js @@ -71,8 +71,13 @@ export function generateWrapperCode( wrapper = DEFAULT_WRAPPERS[func.language]; } + const relativePath = ( + func.language === 'python' ? + func.relativePath.replace('/', '.').replace('\\', '.') : + func.relativePath + ); return WRAPPER_CODE[func.language] - .replace(/RELATIVE_PATH/g, func.relativePath) + .replace(/RELATIVE_PATH/g, relativePath) .replace(/METHOD/g, func.method) .replace(/WRAPPER_TYPE/g, wrapper) .replace(/TOKEN/g, epsagonConf.token)