Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default-directory to the project's root #19

Open
asok opened this issue Mar 24, 2016 · 1 comment
Open

Set default-directory to the project's root #19

asok opened this issue Mar 24, 2016 · 1 comment

Comments

@asok
Copy link
Contributor

asok commented Mar 24, 2016

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
Copy link
Contributor Author

asok commented Mar 24, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant