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

Hardcoded tmp_root prevents multiple users using the same box for development #19

Open
alexjfisher opened this issue Aug 9, 2024 · 0 comments

Comments

@alexjfisher
Copy link

I recently discovered

causes issues when multiple users try to use terraspace from the same box.

I worked around this by monkey-patching the method at the top of my Terrafile.

module TerraspaceBundler::Mod::Concerns
  module PathConcern
    def tmp_root
      "/tmp/terraspace_#{ENV['USER']}/bundler"
    end
  end
end

@tongueroo Would this be an acceptable solution to submit has a PR, or perhaps a new ENV variable entirely would be more appropriate?
eg.

def tmp_root
  ENV['TS_BUNDLER_TMP_DIR'] || '/tmp/terraspace/bundler'
end

or maybe even...

def tmp_root
  ENV['TS_BUNDLER_TMP_DIR'] || "/tmp/terraspace_#{ENV['USER']}/bundler"
end
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