mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 09:13:37 +02:00
lib.ExecContext._chmod(): Fix broken mode string
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
b44879c517
commit
d14f1645c1
1 changed files with 5 additions and 1 deletions
|
|
@ -236,6 +236,10 @@ class ExecContext(Base):
|
||||||
raise e
|
raise e
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __mode_str(cls, mode: int) -> str:
|
||||||
|
return f'{mode:0o}'
|
||||||
|
|
||||||
def __init__(self, uri: str, interactive: bool|None=None, verbose_default=False):
|
def __init__(self, uri: str, interactive: bool|None=None, verbose_default=False):
|
||||||
super().__init__(uri=uri, interactive=interactive, verbose_default=verbose_default)
|
super().__init__(uri=uri, interactive=interactive, verbose_default=verbose_default)
|
||||||
|
|
||||||
|
|
@ -580,4 +584,4 @@ class ExecContext(Base):
|
||||||
await self.run(['chown', ownership, path], cmd_input=InputMode.NonInteractive)
|
await self.run(['chown', ownership, path], cmd_input=InputMode.NonInteractive)
|
||||||
|
|
||||||
async def _chmod(self, path: str, mode: int) -> None:
|
async def _chmod(self, path: str, mode: int) -> None:
|
||||||
await self.run(['chmod', oct(mode), path], cmd_input=InputMode.NonInteractive)
|
await self.run(['chmod', self.__mode_str(mode), path], cmd_input=InputMode.NonInteractive)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue