Skip to content

Commit e7f54a7

Browse files
committed
Fix fetchStarterKit directory issue
1 parent 4d1ebe5 commit e7f54a7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/PatternLab/Fetch.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public function fetchStarterKit($starterkit = "") {
5555
Console::writeError("please provide a path for the starterkit before trying to fetch it...");
5656
}
5757

58+
// figure out the options for the GH path
59+
list($org,$repo,$tag) = $this->getPackageInfo($starterkit);
60+
5861
// set default attributes
5962
$sourceDir = Config::getOption("sourceDir");
6063
$tempDir = sys_get_temp_dir().DIRECTORY_SEPARATOR."pl-sk";
6164
$tempDirSK = $tempDir.DIRECTORY_SEPARATOR."pl-sk-archive";
62-
$tempDirDist = $tempDirSK.DIRECTORY_SEPARATOR."dist";
63-
$tempComposerFile = $tempDirSK.DIRECTORY_SEPARATOR."composer.json";
64-
65-
// figure out the options for the GH path
66-
list($org,$repo,$tag) = $this->getPackageInfo($starterkit);
65+
$tempDirDist = $tempDirSK.DIRECTORY_SEPARATOR.$repo."-".$tag.DIRECTORY_SEPARATOR."dist";
66+
$tempComposerFile = $tempDirSK.DIRECTORY_SEPARATOR.$repo."-".$tag.DIRECTORY_SEPARATOR."composer.json";
6767

6868
//get the path to the GH repo and validate it
6969
$tarballUrl = "https://github.com/".$org."/".$repo."/archive/".$tag.".tar.gz";
@@ -129,7 +129,7 @@ public function fetchStarterKit($starterkit = "") {
129129
Console::writeInfo("cleaning up the temp files...");
130130
$fs = new Filesystem();
131131
$fs->remove($tempFile);
132-
$fs->remove($tempDir);
132+
$fs->remove($tempDirSK);
133133

134134
Console::writeInfo("the starterkit installation is complete...");
135135

0 commit comments

Comments
 (0)