Skip to content

Commit 1cfbc5d

Browse files
committed
add constant for read-execute permissions
1 parent 2fed19a commit 1cfbc5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/deploy_tools/app_builder.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def _create_shell_file(self, app: ShellApp, module: Module) -> None:
103103
create_parents=True,
104104
)
105105

106+
ALL_READ_EXECUTE_PERMISSIONS = 0o555
107+
106108
def _create_binary_file(self, app: BinaryApp, module: Module) -> None:
107109
"""
108110
Download a URL, validate it against its sha256, make it executable
@@ -135,5 +137,4 @@ def _create_binary_file(self, app: BinaryApp, module: Module) -> None:
135137
if h.hexdigest() != app.hash:
136138
raise AppBuilderError(f"Downloaded Binary {app.url} digest failure")
137139

138-
# TODO Martin suggests moving this
139-
binary_path.chmod(0o555)
140+
binary_path.chmod(self.ALL_READ_EXECUTE_PERMISSIONS)

0 commit comments

Comments
 (0)