We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 894c022 commit 1333c95Copy full SHA for 1333c95
src/Operations/Copy.php
@@ -86,8 +86,11 @@ public function run(): Installable
86
87
protected function getStub(string $stubPath, string $basePath): string
88
{
89
- $publishedPath = resource_path('stubs/vendor/statamic-peak-commands/'.ltrim($stubPath, " /\t\n\r\0\x0B"));
90
- $addonPath = $basePath.DIRECTORY_SEPARATOR.ltrim($stubPath, " /\t\n\r\0\x0B");
+ $stubPath = ltrim($stubPath, " /\t\n\r\0\x0B");
+ $addonPath = $basePath.DIRECTORY_SEPARATOR.$stubPath;
91
+
92
+ $stubPath = Str::of($stubPath)->replaceStart('stubs/', '')->toString();
93
+ $publishedPath = resource_path('stubs/vendor/statamic-peak-commands/'.$stubPath);
94
95
return File::get(File::exists($publishedPath) ? $publishedPath : $addonPath);
96
}
0 commit comments