diff --git a/src/Method/ScriptExecutionContext.php b/src/Method/ScriptExecutionContext.php index 823b5dfe..076ad5bb 100644 --- a/src/Method/ScriptExecutionContext.php +++ b/src/Method/ScriptExecutionContext.php @@ -119,7 +119,7 @@ public function enter(ShellProviderInterface $shell): ShellProviderInterface break; case self::DOCKER_IMAGE: - $working_dir = realpath($this->workingDir); + $working_dir = $shell->realPath($this->workingDir); if (!$working_dir) { throw new \RuntimeException(sprintf('Can\'t resolve working dir %s!', $this->workingDir)); } @@ -140,7 +140,7 @@ public function enter(ShellProviderInterface $shell): ShellProviderInterface sprintf('%d:%d', posix_getuid(), posix_getgid()) ), '-v', - sprintf('%s:/app', realpath($this->workingDir)), + sprintf('%s:/app', $working_dir), ]; if (!is_null($entrypoint = $this->getArgument('entryPoint'))) { $cmd[] = sprintf('--entrypoint="%s"', $entrypoint); diff --git a/src/Method/YarnMethod.php b/src/Method/YarnMethod.php index dc4b22ad..f744d085 100644 --- a/src/Method/YarnMethod.php +++ b/src/Method/YarnMethod.php @@ -48,7 +48,7 @@ protected function prepareCommand(HostConfig $host_config, TaskContextInterface public function resetPrepare(HostConfig $host_config, TaskContextInterface $context) { $this->runCommand($host_config, $context, 'install'); - $this->runCommand($host_config, $context, $host_config->get('yarn.buildCommand')); + $this->runCommand($host_config, $context, $host_config->getProperty('yarn.buildCommand')); } public function installPrepare(HostConfig $host_config, TaskContextInterface $context) diff --git a/src/ShellProvider/BaseShellProvider.php b/src/ShellProvider/BaseShellProvider.php index b48c629c..00d006e5 100644 --- a/src/ShellProvider/BaseShellProvider.php +++ b/src/ShellProvider/BaseShellProvider.php @@ -292,8 +292,8 @@ public function putFileContents($filename, $data, TaskContextInterface $context) return $this->fileOperationsHandler->putFileContents($filename, $data, $context); } - public function realPath($filename, TaskContextInterface $context) + public function realPath($filename) { - return $this->fileOperationsHandler->realPath($filename, $context); + return $this->fileOperationsHandler->realPath($filename); } } diff --git a/src/ShellProvider/DeferredFileOperations.php b/src/ShellProvider/DeferredFileOperations.php index 10fc1c64..ef59792b 100644 --- a/src/ShellProvider/DeferredFileOperations.php +++ b/src/ShellProvider/DeferredFileOperations.php @@ -43,7 +43,7 @@ public function putFileContents($filename, $data, TaskContextInterface $context) return $result; } - public function realPath($filename, $context) + public function realPath($filename) { $result = $this->shell->run(sprintf('realpath %s', $filename), true, false); if ($result->failed() || count($result->getOutput()) < 1) { diff --git a/src/ShellProvider/FileOperationsInterface.php b/src/ShellProvider/FileOperationsInterface.php index a9b30718..558bae11 100644 --- a/src/ShellProvider/FileOperationsInterface.php +++ b/src/ShellProvider/FileOperationsInterface.php @@ -8,5 +8,5 @@ interface FileOperationsInterface { public function getFileContents($filename, TaskContextInterface $context); public function putFileContents($filename, $data, TaskContextInterface $context); - public function realPath($filename, $context); + public function realPath($filename); } diff --git a/src/ShellProvider/LocalFileOperations.php b/src/ShellProvider/LocalFileOperations.php index 61b1dc26..1b10f03c 100644 --- a/src/ShellProvider/LocalFileOperations.php +++ b/src/ShellProvider/LocalFileOperations.php @@ -17,7 +17,7 @@ public function putFileContents($filename, $data, TaskContextInterface $context) return file_put_contents($filename, $data); } - public function realPath($filename, $context) + public function realPath($filename) { return realpath($filename); } diff --git a/src/ShellProvider/NoopFileOperations.php b/src/ShellProvider/NoopFileOperations.php index 0240c03d..22c9931f 100644 --- a/src/ShellProvider/NoopFileOperations.php +++ b/src/ShellProvider/NoopFileOperations.php @@ -18,7 +18,7 @@ public function putFileContents($filename, $data, TaskContextInterface $context) return false; } - public function realPath($filename, $context) + public function realPath($filename) { return $filename; } diff --git a/src/ShellProvider/ShellProviderInterface.php b/src/ShellProvider/ShellProviderInterface.php index 35247369..1b9ea94a 100644 --- a/src/ShellProvider/ShellProviderInterface.php +++ b/src/ShellProvider/ShellProviderInterface.php @@ -108,5 +108,5 @@ public function getFileContents($filename, TaskContextInterface $context); public function putFileContents($filename, $data, TaskContextInterface $context); - public function realPath($filename, TaskContextInterface $context); + public function realPath($filename); } diff --git a/src/ShellProvider/UnsupportedFileOperations.php b/src/ShellProvider/UnsupportedFileOperations.php index 78303492..1aa3a577 100644 --- a/src/ShellProvider/UnsupportedFileOperations.php +++ b/src/ShellProvider/UnsupportedFileOperations.php @@ -17,7 +17,7 @@ public function putFileContents($filename, $data, TaskContextInterface $context) throw new \RuntimeException('putFileContents not supported in this context!'); } - public function realPath($filename, $context) + public function realPath($filename) { throw new \RuntimeException('realPath not supported in this context!'); }