Skip to content

Commit 47cfd84

Browse files
committed
Bugfix destination path
1 parent 3acda36 commit 47cfd84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/VendorPublisher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(?string $source = null, ?string $destination = null)
3232
throw new DomainException('Invalid relative destination $path.');
3333
}
3434

35-
$this->destination = VendorBundle::base();
35+
$this->destination = VendorBundle::base() . ltrim($this->path, '/ ');
3636

3737
if (! is_dir($this->destination)) {
3838
mkdir($this->destination, 0775, true);

tests/VendorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ public function testPublisherThrowsWithoutPath()
2020

2121
public function testPublisherSetsDestination()
2222
{
23-
// Allow publishing ot the test folder
23+
// Allow publishing to the test folder
2424
config('Publisher')->restrictions[SUPPORTPATH] = '*';
2525

2626
$publisher = new class () extends VendorPublisher {
2727
protected $path = 'foobar';
2828
};
2929

30-
$this->assertSame(SUPPORTPATH . 'Files/external/', $publisher->getDestination());
30+
$this->assertSame(SUPPORTPATH . 'Files/external/foobar/', $publisher->getDestination());
3131
}
3232

3333
public function testBundleAddsPath()

0 commit comments

Comments
 (0)