lib/ios/iosOption.rb in shellboxCLI-0.1.9 vs lib/ios/iosOption.rb in shellboxCLI-0.1.10
- old
+ new
@@ -1,11 +1,10 @@
require 'ios/module/setup/Template_Configurator'
require 'thor'
module App
-
class IOS_CLI < Thor
desc "module", "Create a new module to iOS platform"
def module
IOS::TemplateConfigurator.new.run
end
@@ -30,11 +29,27 @@
end
private
def install_hooks
+ hooks_directory = File.expand_path(File.join(File.dirname(__FILE__), 'hooks'))
+ install_hooks_path = File.join(hooks_directory, 'install-hooks.rb')
+
+ unless File.exist?(install_hooks_path)
+ puts "O arquivo install-hooks.rb não foi encontrado em #{hooks_directory}."
+ return
+ end
+
puts "Executando install_hooks..."
- system('ruby hooks/install-hooks.rb')
- puts "✅ Hooks instalados com sucesso"
+
+ Dir.chdir(hooks_directory) do
+ success = system('ruby install-hooks.rb')
+
+ if success
+ puts "✅ Hooks instalados com sucesso!"
+ else
+ puts "❌ Erro ao executar pre-hook"
+ end
+ end
end
end
end