Skip to content

Commit d158c3c

Browse files
committed
add possibility to reevaluate the deps path
1 parent 69fb69f commit d158c3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/php/libsdk/SDK/Config.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ public static function getSdkVersion() : string
294294
return file_get_contents($path);
295295
}/*}}}*/
296296

297-
public static function getDepsLocalPath() : ?string
297+
public static function getDepsLocalPath(bool $reset = false) : ?string
298298
{/*{{{*/
299-
if (NULL == self::$depsLocalPath) {
299+
if (NULL == self::$depsLocalPath || $reset) {
300300
if (file_exists("Makefile")) {
301301
$s = file_get_contents("Makefile");
302302

@@ -308,13 +308,13 @@ public static function getDepsLocalPath() : ?string
308308
}
309309
}
310310

311-
if (NULL == self::$depsLocalPath) {
311+
if (NULL == self::$depsLocalPath || $reset) {
312312
if (file_exists("../deps")) {
313313
self::setDepsLocalPath(realpath("../deps"));
314314
}
315315
}
316316

317-
if (NULL == self::$depsLocalPath) {
317+
if (NULL == self::$depsLocalPath || $reset) {
318318
if (file_exists("main/php_version.h")) {
319319
/* Deps dir might not exist. */
320320
self::setDepsLocalPath(realpath("..") . DIRECTORY_SEPARATOR . "deps");

0 commit comments

Comments
 (0)