Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveorevo committed Aug 9, 2023
1 parent 9ca0660 commit 387f5db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/pluginable.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function str_starts_with($haystack, $needle) {

// Get plugin version via trusted command
$hcpp->add_action( 'hcpp_invoke_plugin', function( $args ) {
if ( $args[0] == 'get_plugin_version' ) {
if ( $args[0] == 'hcpp_get_plugin_version' ) {
$plugin = $args[1];
$version = shell_exec( 'cd "' . $plugin . '" && git describe --tags --abbrev=0' );
echo $version;
Expand Down Expand Up @@ -914,7 +914,7 @@ function str_starts_with($haystack, $needle) {
// Extract version if git repo
$version = '';
if ( file_exists( $p . '/.git' ) ) {
$version = trim( $hcpp->run( 'invoke-plugin get_plugin_version ' . escapeshellarg( $p ) ) );
$version = trim( $hcpp->run( 'invoke-plugin hcpp_get_plugin_version ' . escapeshellarg( $p ) ) );
$version = trim( $version );
}
if ( is_dir( $p ) && ($p[0] != '.') ) {
Expand Down

0 comments on commit 387f5db

Please sign in to comment.