Fix config load path

This commit is contained in:
Niklas Keller
2016-06-04 19:51:02 +02:00
parent c4d15e2e26
commit 9f849691c2
2 changed files with 9 additions and 6 deletions

13
composer.lock generated
View File

@@ -1896,16 +1896,16 @@
},
{
"name": "phpunit/phpunit-mock-objects",
"version": "3.2.0",
"version": "3.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
"reference": "314f8c44019b4dfece2571b98938574e6342be59"
"reference": "0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/314f8c44019b4dfece2571b98938574e6342be59",
"reference": "314f8c44019b4dfece2571b98938574e6342be59",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3",
"reference": "0dc8fd8e87e0366c22b6c25d1f43c4e2e66847b3",
"shasum": ""
},
"require": {
@@ -1914,6 +1914,9 @@
"phpunit/php-text-template": "^1.2",
"sebastian/exporter": "^1.2"
},
"conflict": {
"phpunit/phpunit": "<5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^5.4"
},
@@ -1948,7 +1951,7 @@
"mock",
"xunit"
],
"time": "2016-06-03 05:01:30"
"time": "2016-06-04 05:52:19"
},
{
"name": "rych/bytesize",

View File

@@ -117,7 +117,7 @@ function normalizePath($path) {
* @return string|null Resolves to the config path or null.
*/
function getConfigPath() {
$paths = isPhar() ? [substr(dirname(Phar::running(true)), strlen("phar://")) . "acme-client.yml"] : [];
$paths = isPhar() ? [substr(dirname(Phar::running(true)), strlen("phar://")) . "/acme-client.yml"] : [];
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
if ($home = getenv("HOME")) {