File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function fetchStarterKit($starterkit = "") {
57
57
58
58
// set default attributes
59
59
$ sourceDir = Config::getOption ("sourceDir " );
60
- $ tempDir = sys_get_temp_dir ();
60
+ $ tempDir = sys_get_temp_dir (). DIRECTORY_SEPARATOR . " pl-sk " ;
61
61
$ tempDirSK = $ tempDir .DIRECTORY_SEPARATOR ."pl-sk-archive " ;
62
62
$ tempDirDist = $ tempDirSK .DIRECTORY_SEPARATOR ."dist " ;
63
63
$ tempComposerFile = $ tempDirSK .DIRECTORY_SEPARATOR ."composer.json " ;
@@ -75,6 +75,14 @@ public function fetchStarterKit($starterkit = "") {
75
75
$ error = error_get_last ();
76
76
Console::writeError ("the starterkit wasn't downloaded because: \n\n " .$ error ["message " ]);
77
77
}
78
+
79
+ // Create temp directory if doesn't exist
80
+ $ fs = new Filesystem ();
81
+ try {
82
+ $ fs ->mkdir ($ tempDir , 0775 );
83
+ } catch (IOExceptionInterface $ e ) {
84
+ Console::writeError ("Error creating temporary directory at " . $ e ->getPath ());
85
+ }
78
86
79
87
// write the package to the temp directory
80
88
$ tempFile = tempnam ($ tempDir , "pl-sk-archive.tar.gz " );
You can’t perform that action at this time.
0 commit comments