solara/lib/solara_initializer.rb in solara-0.2.0 vs solara/lib/solara_initializer.rb in solara-0.2.1

- old
+ new

@@ -18,16 +18,19 @@ end def init Solara.logger.header("Initializing Solara") confirm_init_if_necessary + + ProjectDoctor.new.visit + message = "Initialized #{SolaraSettingsManager.instance.platform} successfully." SolaraManager.new.onboard(@brand_key, @brand_name, init: true, success_message: message) end def confirm_init_if_necessary - brand_path = File.join(FilePath.solara, 'brands') + brand_path = FilePath.brands # Check if Solara path exists if Dir.exist?(brand_path) Solara.logger.warn("Solara already initialized! Be aware that reinitializing will delete all current brands!") Solara.logger.warn("Don't say I didn't warn you!") Solara.logger.warn("Do you want to proceed? (y/n)") @@ -35,10 +38,10 @@ unless confirmation == 'y' Solara.logger.info("Solara initialization cancelled.") exit 1 end - FileUtils.rm_rf(brand_path) + FileManager.delete_if_exists(brand_path) end end end