lib/falcon/command/virtual.rb in falcon-0.33.0 vs lib/falcon/command/virtual.rb in falcon-0.33.1
- old
+ new
@@ -52,24 +52,28 @@
Process::GID.change_privilege(stat.gid)
Process::UID.change_privilege(stat.uid)
end
- def spawn(path, container)
+ def spawn(path, container, **options)
container.spawn(name: self.name, restart: true) do |instance|
assume_privileges(path)
- instance.exec("bundle", "exec", path)
+ instance.exec("bundle", "exec", path, **options)
end
end
def run(verbose = false)
configuration = Configuration.new(verbose)
container = Async::Container.new
@paths.each do |path|
+ path = File.expand_path(path)
+ root = File.dirname(path)
+
configuration.load_file(path)
- spawn(path, container)
+
+ spawn(path, container, chdir: root)
end
hosts = Hosts.new(configuration)
hosts.run(container, **@options)