Fix small bug for local repo (#1295)

* Fix target repo path error for local repo config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Pan Yinxu
2025-09-15 23:34:41 +08:00
committed by GitHub
parent e38a4adc81
commit 1aa6b367f5
+3 -1
View File
@@ -110,7 +110,9 @@ class LocalRepoConfig(BaseModel):
asyncio.run(
deployment.runtime.upload(UploadRequest(source_path=str(self.path), target_path=f"/{self.repo_name}"))
)
r = asyncio.run(deployment.runtime.execute(Command(command=f"chown -R root:root {self.repo_name}", shell=True)))
r = asyncio.run(
deployment.runtime.execute(Command(command=f"chown -R root:root /{self.repo_name}", shell=True))
)
if r.exit_code != 0:
msg = f"Failed to change permissions on copied repository (exit code: {r.exit_code}, stdout: {r.stdout}, stderr: {r.stderr})"
raise RuntimeError(msg)