fix builds of relative paths
authorMichael Wallner <mike@php.net>
Wed, 27 Jun 2018 07:33:17 +0000 (09:33 +0200)
committerMichael Wallner <mike@php.net>
Wed, 27 Jun 2018 07:33:17 +0000 (09:33 +0200)
src/pharext/SourceDir/Basic.php

index 13891d02a9b65eeb452a065e7453f4f9d6362086..e5b2d230c36ea071dc4e28133a09895df2abd7f1 100644 (file)
@@ -18,13 +18,13 @@ class Basic implements IteratorAggregate, SourceDir
 {
        use License;
        use PackageInfo;
-       
+
        private $path;
-       
+
        public function __construct($path) {
-               $this->path = $path;
+               $this->path = realpath($path);
        }
-       
+
        public function getBaseDir() {
                return $this->path;
        }
@@ -36,7 +36,7 @@ class Basic implements IteratorAggregate, SourceDir
        public function getPackageInfo() {
                return $this->findPackageInfo($this->getBaseDir());
        }
-       
+
        public function getLicense() {
                if (($file = $this->findLicense($this->getBaseDir()))) {
                        return $this->readLicense($file);
@@ -47,7 +47,7 @@ class Basic implements IteratorAggregate, SourceDir
        public function getArgs() {
                return [];
        }
-       
+
        public function setArgs(Args $args) {
        }