Skip to content

Commit

Permalink
Fix directory permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Feb 14, 2025
1 parent 820056e commit deb3f6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Actions/GetArtifacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public function handle($workflow_run_id, $token): void
if (is_dir($workflowRunDirectory)) {
(new Helpers)->rmdirr($workflowRunDirectory);
}
mkdir($workflowRunDirectory, 0755, true);
umask(0);
mkdir($workflowRunDirectory, 0777, true);
foreach ($artifacts['artifacts'] as $artifact) {
$filepath = $workflowRunDirectory . "/" . $artifact['name'] . ".zip";
(new FetchArtifact)->handle($artifact['archive_download_url'], $filepath, $token);
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/PeclController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ protected function fetchExtension(string $extension, string $ref, string $url, s
$filepath = $directory . "/$extension-$ref-" . hash('sha256', $url) . strtotime('now') . ".zip";

if(!is_dir($directory)) {
mkdir($directory, 0755, true);
umask(0);
mkdir($directory, 0777, true);
}

(new FetchArtifact)->handle($url, $filepath, $token);
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/PhpController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ private function fetchPhpBuild(string $url, string $token): void
$filepath = $directory . "/php-" . $hash . ".zip";

if(!is_dir($directory)) {
mkdir($directory, 0755, true);
umask(0);
mkdir($directory, 0777, true);
}

(new FetchArtifact)->handle($url, $filepath, $token);
Expand Down

0 comments on commit deb3f6f

Please sign in to comment.