Skip to content

Instantly share code, notes, and snippets.

@thbar
Created January 30, 2009 15:28
Show Gist options
  • Save thbar/55108 to your computer and use it in GitHub Desktop.
Save thbar/55108 to your computer and use it in GitHub Desktop.
better ts:index ?
Index: thinking-sphinx/tasks/thinking_sphinx_tasks.rb
===================================================================
--- thinking-sphinx/tasks/thinking_sphinx_tasks.rb (revision 809)
+++ thinking-sphinx/tasks/thinking_sphinx_tasks.rb (revision 881)
@@ -59,12 +59,12 @@
puts "Generating Configuration to #{config.config_file}"
config.build
end
-
+
FileUtils.mkdir_p config.searchd_file_path
cmd = "#{config.bin_path}indexer --config #{config.config_file} --all"
cmd << " --rotate" if sphinx_running?
puts cmd
- system cmd
+ throw "Command failure! (#{cmd})" unless system(cmd)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment