Skip to content

Commit

Permalink
fix: remove setfacl calls on Darwin and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarlovi committed Sep 27, 2023
1 parent e34c9b4 commit 279df7e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 32 deletions.
8 changes: 0 additions & 8 deletions resources/Common/Platform/Darwin/default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,4 @@ $(shell test -f ${2}${1} && echo -n ${2}${1} || echo ${1})
endef

define permissions
setfacl -dRm m:rwX $(1)
setfacl -Rm m:rwX $(1)
setfacl -dRm u:`whoami`:rwX $(1)
setfacl -Rm u:`whoami`:rwX $(1)
setfacl -dRm u:${RUNNER}:rwX $(1)
setfacl -Rm u:${RUNNER}:rwX $(1)
setfacl -dRm u:root:rwX $(1)
setfacl -Rm u:root:rwX $(1)
endef
9 changes: 1 addition & 8 deletions resources/Common/Platform/Linux/default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,5 @@ $(shell test -f ${2}${1} && echo -n ${2}${1} || echo ${1})
endef

define permissions
setfacl -dRm m:rwX $(1)
setfacl -Rm m:rwX $(1)
setfacl -dRm u:`whoami`:rwX $(1)
setfacl -Rm u:`whoami`:rwX $(1)
setfacl -dRm u:${RUNNER}:rwX $(1)
setfacl -Rm u:${RUNNER}:rwX $(1)
setfacl -dRm u:root:rwX $(1)
setfacl -Rm u:root:rwX $(1)

endef
8 changes: 0 additions & 8 deletions resources/Common/Platform/Windows/default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,4 @@ endef

# TODO: review
define permissions
setfacl -dRm m:rwX $(1)
setfacl -Rm m:rwX $(1)
setfacl -dRm u:`whoami`:rwX $(1)
setfacl -Rm u:`whoami`:rwX $(1)
setfacl -dRm u:${RUNNER}:rwX $(1)
setfacl -Rm u:${RUNNER}:rwX $(1)
setfacl -dRm u:root:rwX $(1)
setfacl -Rm u:root:rwX $(1)
endef
18 changes: 10 additions & 8 deletions tests/functional/MakefileTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,16 @@ protected function generatePermissionsExecutionPath(array $dirs): array
$commands = [];
foreach ($dirs as $dir) {
$commands[] = sprintf('mkdir -p %1$s', $dir);
$commands[] = sprintf('setfacl -dRm m:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm m:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -dRm u:`whoami`:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm u:`whoami`:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -dRm u:999:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm u:999:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -dRm u:root:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm u:root:rwX %1$s', $dir);
if (\PHP_OS_FAMILY === 'linux') {
$commands[] = sprintf('setfacl -dRm m:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm m:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -dRm u:`whoami`:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm u:`whoami`:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -dRm u:999:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm u:999:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -dRm u:root:rwX %1$s', $dir);
$commands[] = sprintf('setfacl -Rm u:root:rwX %1$s', $dir);
}
}

return $commands;
Expand Down

0 comments on commit 279df7e

Please sign in to comment.