mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-19 13:24:51 +08:00
Prefer cache extract path in getSourceDir method
This commit is contained in:
parent
b0b3220716
commit
88af4a719f
@ -292,8 +292,11 @@ class Artifact
|
||||
*/
|
||||
public function getSourceDir(): string
|
||||
{
|
||||
// defined in config
|
||||
$extract = $this->config['source']['extract'] ?? null;
|
||||
// Prefer cache extract path, fall back to config
|
||||
$cache_info = ApplicationContext::get(ArtifactCache::class)->getSourceInfo($this->name);
|
||||
$extract = is_string($cache_info['extract'] ?? null)
|
||||
? $cache_info['extract']
|
||||
: ($this->config['source']['extract'] ?? null);
|
||||
|
||||
if ($extract === null) {
|
||||
return FileSystem::convertPath(SOURCE_PATH . '/' . $this->name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user