bundler.el
bundler.el copied to clipboard
Set `default-directory` to the project's root
Have you ever thought about running the bundler from a project's root? Maybe by using locate-dominating-file or projectile.
I'm asking because now I work on a project which has something like that in Gemfile:
require './lib/gemfile_helpers'
And I'm forces to run bundle from the root dir of the project.
As a workaround I did something like this:
(defun asok/bundle--around (fun &rest args)
"Run FUN from the project root."
(projectile-with-default-dir (projectile-project-root)
(apply fun args)))
(advice-add 'bundle-command :around #'asok/bundle--around)
But I think it could be useful for bundler.el to do this by its own.