Skip to content

Commit d7d5308

Browse files
committed
minor fix in src_path
1 parent a34000c commit d7d5308

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/js-sdk/src/template/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export async function calculateFilesHash(
109109
resolveSymlinks: boolean,
110110
stackTrace: string | undefined
111111
): Promise<string> {
112-
const srcPath = path.join(contextPath, src)
112+
const srcPath = path.isAbsolute(src) ? src : path.join(contextPath, src)
113113
const hash = crypto.createHash('sha256')
114114
const content = `COPY ${src} ${dest}`
115115

packages/python-sdk/e2b/template/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def calculate_files_hash(
119119
120120
:raises ValueError: If no files match the source pattern
121121
"""
122-
src_path = os.path.join(context_path, src)
122+
src_path = src if os.path.isabs(src) else os.path.join(context_path, src)
123123
hash_obj = hashlib.sha256()
124124
content = f"COPY {src} {dest}"
125125

0 commit comments

Comments
 (0)