Skip to content

Commit

Permalink
Component: Package.php
Browse files Browse the repository at this point in the history
the copy of the package directory adds itself to its own subdirectory thus breaking PSR4 auto loader path
fix removes one subdir from the copy

add comments in code

fixes #1
  • Loading branch information
alanef committed Apr 26, 2021
1 parent 35d7695 commit d9477e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Models/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ public function process($configuration, string $packagePrefix, string $namespace
* change $this->name dirname of $this->name it make sthe assumption ALL packages are in teh format account/package
* maybe this needs to be validated but I haven't found an example that doesn't
*/
`cp -r {$this->path} $outputPath . dirname( $this->name )`;
$target = $outputPath . dirname( $this->name );
`cp -r {$this->path} {$target}`;

file_put_contents($outputPath.$this->name.'/composer.json', json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));

Expand Down

0 comments on commit d9477e7

Please sign in to comment.