lib/srv_manager/process.rb in srv_manager-0.0.7 vs lib/srv_manager/process.rb in srv_manager-0.0.8

- old
+ new

@@ -42,23 +42,27 @@ false end private - def detault_start + def default_start @id = ::Process.spawn command.env, command.text, chdir: command.dir, out: '/dev/null', err: '/dev/null' ::Process.detach @id end def rvm_start pid_file = File.expand_path "#{self.object_id}_#{Time.now.to_i}.pid", TMP_PATH - rvm_pid = ::Process.spawn command.env.merge('SRV_COMMAND' => command.text, 'SRV_PIDFILE' => pid_file), + params = { + 'SRV_COMMAND' => command.text, + 'SRV_PIDFILE' => pid_file, + 'CHDIR' => command.dir + } + rvm_pid = ::Process.spawn command.env.merge(params), RVM_RUNNER, - chdir: command.dir, out: '/dev/null', err: '/dev/null' ::Process.detach rvm_pid @id = wait_for_pid pid_file, true end \ No newline at end of file