Compare commits

...

1 Commits

Author SHA1 Message Date
macintoshplus
a992318304 fix bug send useragent with new line char 2024-11-13 21:58:01 +01:00

View File

@@ -218,7 +218,7 @@ class Config
} }
/* Try to figure out the branch. The worky scenarios are /* Try to figure out the branch. The worky scenarios are
- CWD is in php-src - CWD is in php-src
- phpize is on the path - phpize is on the path
FIXME for the dev package, there should be a php-config utility FIXME for the dev package, there should be a php-config utility
*/ */
@@ -256,7 +256,7 @@ class Config
$cmd = "\"$git\" branch"; $cmd = "\"$git\" branch";
$ret = trim(shell_exec($cmd)); $ret = trim(shell_exec($cmd));
if (preg_match_all(",\*\s+master,", $ret) > 0) { if (preg_match_all(",\*\s+master,", $ret) > 0) {
$branch = "master"; $branch = "master";
} }
} }
@@ -271,7 +271,7 @@ class Config
$branch = self::guessCurrentBranchName(); $branch = self::guessCurrentBranchName();
self::setCurrentBranchName($branch); self::setCurrentBranchName($branch);
} }
return self::$currentBranchName; return self::$currentBranchName;
}/*}}}*/ }/*}}}*/
@@ -336,7 +336,7 @@ class Config
throw new Exception("Failed to find config with arch '" . self::getCurrentArchName() . "'"); throw new Exception("Failed to find config with arch '" . self::getCurrentArchName() . "'");
} }
return $ret; return $ret;
}/*}}}*/ }/*}}}*/
public static function getSdkNugetFeedUrl() : string public static function getSdkNugetFeedUrl() : string
@@ -368,7 +368,7 @@ class Config
throw new Exception("Couldn't find the SDK version file."); throw new Exception("Couldn't find the SDK version file.");
} }
return file_get_contents($path); return trim(file_get_contents($path));
}/*}}}*/ }/*}}}*/
public static function getDepsLocalPath() : ?string public static function getDepsLocalPath() : ?string
@@ -391,7 +391,7 @@ class Config
self::setDepsLocalPath($tmp); self::setDepsLocalPath($tmp);
} }
} }
if (NULL == self::$depsLocalPath) { if (NULL == self::$depsLocalPath) {
$tmp = realpath("../deps"); $tmp = realpath("../deps");
if (is_dir($tmp)) { if (is_dir($tmp)) {