Explorar o código

Git 2.21 compatiblity (#3669)

#fix https://github.com/FreshRSS/FreshRSS/issues/3665
`git branch --show-current` requires git 2.22+
https://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git
Alexandre Alapetite %!s(int64=5) %!d(string=hai) anos
pai
achega
c5ca737062
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/Controllers/updateController.php

+ 2 - 1
app/Controllers/updateController.php

@@ -16,7 +16,8 @@ class FreshRSS_update_Controller extends Minz_ActionController {
 			throw new Exception($errorMessage);
 		}
 
-		exec('git branch --show-current', $output, $return);
+		//Note `git branch --show-current` requires git 2.22+
+		exec('git symbolic-ref --short HEAD', $output, $return);
 		if ($return != 0) {
 			throw new Exception($errorMessage);
 		}