bundler.el icon indicating copy to clipboard operation
bundler.el copied to clipboard

Set `default-directory` to the project's root

Open asok opened this issue 10 years ago • 1 comments

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.

asok avatar Mar 24 '16 11:03 asok

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.

asok avatar Mar 24 '16 11:03 asok