File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public static function getPhpfastcacheVersion(bool $fallbackOnChangelog = true,
7070 }
7171
7272 if (\function_exists ('shell_exec ' )) {
73- $ command = 'git -C " ' . __DIR__ . '" describe --abbrev=0 --tags ' ;
73+ $ command = 'git -C " ' . __DIR__ . '" describe --abbrev=0 --tags ' . ( DIRECTORY_SEPARATOR === '\\' ? ' 2>nul ' : ' 2>/dev/null ' ) ;
7474 $ stdout = \shell_exec ($ command );
7575 if (\is_string ($ stdout )) {
7676 return trim ($ stdout );
@@ -133,7 +133,7 @@ public static function getPhpfastcacheGitHeadHash(bool $cacheable = true): strin
133133 }
134134
135135 if (\function_exists ('shell_exec ' )) {
136- $ stdout = \shell_exec ('git rev-parse --short HEAD ' );
136+ $ stdout = \shell_exec ('git rev-parse --short HEAD ' . ( DIRECTORY_SEPARATOR === '\\' ? ' 2>nul ' : ' 2>/dev/null ' ) );
137137 if (\is_string ($ stdout )) {
138138 return '# ' . \trim ($ stdout );
139139 }
You can’t perform that action at this time.
0 commit comments