Skip to content

Commit

Permalink
fix: github app install wrong folder
Browse files Browse the repository at this point in the history
  • Loading branch information
praswicaksono committed Nov 16, 2024
1 parent d9ef74c commit 0c059d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private function downloadFromGithub(string $namespace, string $url): \Generator
mkdir -p -m755 {$dir}
curl -L --progress-bar {$githubUrl} -o '{$dir}/{$appName}.zip'
unzip {$dir}/{$appName}.zip -d {$dir}
mv {$dir}/{$appName}-{$tag} {$cwd}
mv {$dir}/apps-{$appName}-{$tag} {$cwd}
chmod 755 {$cwd}
find {$cwd} -type d -exec chmod 755 {} \; && find {$cwd} -type f -exec chmod 644 {} \;
rm -f {$cwd}.zip
Expand Down
2 changes: 2 additions & 0 deletions src/Command/ServiceDelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ private function deleteService(string $namespace, string $name): \Generator
$this->io->success('Service has been deleted.');

if (array_key_exists($name, $apps)) {
$appDir = getenv('HOME') . "/.mager/apps/{$namespace}/{$name}";
yield "rm -rf {$appDir}";
unset($apps[$name]);
$this->config->set("{$namespace}.apps", $apps);
$this->config->save();
Expand Down

0 comments on commit 0c059d6

Please sign in to comment.