Skip to content

Commit 6331c97

Browse files
authored
fix: Strip leading / from server path in script pull (#211)
`os.path.join` ignores the working directory when the second argument is an absolute path. Server-side `path` values start with `/`, causing files to be written to the filesystem root instead of `working_dir`.
1 parent 8c79328 commit 6331c97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/viur_cli/scriptor/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async def main():
126126
working_dir = scriptor_config.get("working_dir")
127127

128128
async def process_entry(entry: dict, is_node: bool):
129-
_path = os.path.join(working_dir, entry["path"])
129+
_path = os.path.join(working_dir, entry["path"].lstrip("/"))
130130

131131
if is_node:
132132
if not os.path.exists(_path):

0 commit comments

Comments
 (0)