lib/nanoc/cli.rb in nanoc-4.3.2 vs lib/nanoc/cli.rb in nanoc-4.3.3

- old
+ new

@@ -104,10 +104,16 @@ add_command(cmd) end if defined?(Bundler) # Discover external commands through Bundler - Bundler.require(:nanoc) + begin + Bundler.require(:nanoc) + rescue Bundler::GemfileNotFound + # When running nanoc with Bundler being defined but + # no gemfile being present (rubygems automatically loads + # Bundler when executing from command line), don't crash. + end end end # Loads site-specific commands. #