lib/falcon/command/virtual.rb in falcon-0.33.1 vs lib/falcon/command/virtual.rb in falcon-0.33.2

- old
+ new

@@ -50,16 +50,22 @@ def assume_privileges(path) stat = File.stat(path) Process::GID.change_privilege(stat.gid) Process::UID.change_privilege(stat.uid) + + home = Etc.getpwuid(stat.uid).dir + + return { + HOME: home, + } end def spawn(path, container, **options) container.spawn(name: self.name, restart: true) do |instance| - assume_privileges(path) + env = assume_privileges(path) - instance.exec("bundle", "exec", path, **options) + instance.exec(env, "bundle", "exec", path, **options) end end def run(verbose = false) configuration = Configuration.new(verbose)