Browse Source

Fix bundle publishing bug.

If the bundle was not registered, crazy stuff would happen. We just won't publish for non-existent bundles.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
Taylor Otwell 12 years ago
parent
commit
893f65fc02
1 changed files with 7 additions and 0 deletions
  1. 7 0
      laravel/cli/tasks/bundle/publisher.php

+ 7 - 0
laravel/cli/tasks/bundle/publisher.php

@@ -14,6 +14,13 @@ class Publisher {
 	 */
 	public function publish($bundle)
 	{
+		if ( ! Bundle::exists($bundle))
+		{
+			echo "Bundle [$bundle] is not registered.";
+
+			return;
+		}
+
 		$path = Bundle::path($bundle);
 
 		$this->move($path.'public', path('public').'bundles'.DS.$bundle);