Skip to content

Commit

Permalink
Versioned projects should not render addons as unversioned (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Sep 17, 2023
1 parent 1fc5ad4 commit 9122679
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pages/target-chooser.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
}

$batches = [];
if (!is_dir($addonPath.'/.git')) {
if (
!is_dir($addonPath.'/.git') // the addon is versioned?
&& !is_dir(rex_path::base('.git')) // the while project is versioned?
) {
$batches[] = '<span class="label label-danger">unversioned sources</span>';
} elseif ($hasGit) {
RexCmd::execCmd('cd '. escapeshellarg($addonPath) .' && git diff --quiet', $stdErr, $exitCode);
Expand Down

0 comments on commit 9122679

Please sign in to comment.