mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
fix: permission issues
This commit is contained in:
parent
5aa94036d1
commit
0314547c95
1 changed files with 3 additions and 4 deletions
|
|
@ -281,7 +281,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
// Make sure we have a clean slate.
|
||||
// Otherwise, all files in this dir will be pushed,
|
||||
// regardless of whether they were just generated or not.
|
||||
\exec('rm -rf ' . $result);
|
||||
\exec('chmod -R u+w ' . $result . ' 2>/dev/null; rm -rf ' . $result);
|
||||
|
||||
try {
|
||||
$sdk->generate($result);
|
||||
|
|
@ -298,7 +298,6 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
|
||||
$repoBranch = $language['repoBranch'] ?? 'main';
|
||||
if ($git && !empty($gitUrl)) {
|
||||
// TODO: fix the temporary 2>/dev/null || true - added due to permission issues when removing files
|
||||
\exec('rm -rf ' . $target . ' && \
|
||||
mkdir -p ' . $target . ' && \
|
||||
cd ' . $target . ' && \
|
||||
|
|
@ -310,7 +309,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
git checkout ' . $gitBranch . ' || git checkout -b ' . $gitBranch . ' && \
|
||||
git fetch origin ' . $gitBranch . ' || git push -u origin ' . $gitBranch . ' && \
|
||||
git pull origin ' . $gitBranch . ' && \
|
||||
rm -rf ' . $target . '/* 2>/dev/null || true && \
|
||||
find . -mindepth 1 ! -path "./.git*" -delete && \
|
||||
cp -r ' . $result . '/. ' . $target . '/ && \
|
||||
git add . && \
|
||||
git commit -m "' . $message . '" && \
|
||||
|
|
@ -377,7 +376,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|||
}
|
||||
}
|
||||
|
||||
\exec('rm -rf ' . $target);
|
||||
\exec('chmod -R u+w ' . $target . ' && rm -rf ' . $target);
|
||||
Console::success("Remove temp directory '{$target}' for {$language['name']} SDK");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue