• mikecho

    (@mikecho)


    This might be the same issue as the other open issue.

    I can call shell_exec commands directly in the plugin. I mocked this up:

    <?php
    
    echo shell_exec( 'cd ' . 'c://xampp/htdocs/normal_site_dev/wp-content/plugins/my-plugin' . ' && git rev-parse --abbrev-ref HEAD' );

    and navigated directly to the script (shell.php, located in c://xampp/htdocs/normal_site_dev/wp-content/display-git-status/shell.php).

    And got the desired output. It seems there is something missing in the chain, but I haven’t figured that out yet.

    UPDATE:

    by removing escapeshellcmd in dgs_get_branch_name and dgs_is_up_to_date, the plugin then displayed the branch name correctly.

    • This topic was modified 3 years ago by mikecho.
    • This topic was modified 3 years ago by mikecho.
  • The topic ‘The saved location is not a git repository! The git status menu item will be hid’ is closed to new replies.