Move preloaded modules to separate file
This commit is contained in:
parent
519c05d9c9
commit
65df9d8fcc
@ -9,6 +9,7 @@ edition = "2018"
|
||||
assets = [
|
||||
["github-fast-env/github-fast-envd.rb", "usr/bin/github-fast-envd", "755"],
|
||||
["github-fast-env/github-fast-env.rb", "usr/bin/github-fast-env", "755"],
|
||||
["github-fast-env/preload.rb", "usr/lib/github-fast-env/", "755"],
|
||||
["github-fast-env/systemd/github-fast-envd.service", "usr/lib/systemd/system/", "644"],
|
||||
["ghe-fast-tools/ghe-fast-console.rb", "usr/lib/ghe-fast-tools/", "644"],
|
||||
["ghe-fast-tools/bin/ghe-fast-console.rb", "usr/bin/ghe-fast-console", "755"],
|
||||
|
@ -4,10 +4,6 @@ require "base64"
|
||||
require "io/console"
|
||||
require "socket"
|
||||
|
||||
require "/data/github/current/config/environment"
|
||||
require "irb"
|
||||
require "irb/completion"
|
||||
|
||||
class ClientError < StandardError
|
||||
def initialize(message)
|
||||
super(message)
|
||||
@ -154,6 +150,8 @@ def set_up_pseudoterminal(control_socket, pseudoterminal_path)
|
||||
control_socket.puts "ready"
|
||||
end
|
||||
|
||||
load "/usr/lib/github-fast-env/preload.rb"
|
||||
|
||||
while true
|
||||
control_socket = control_server.accept
|
||||
$original_stderr.puts "- new connection"
|
||||
|
5
github-fast-env/preload.rb
Normal file
5
github-fast-env/preload.rb
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "/data/github/current/config/environment"
|
||||
require "irb"
|
||||
require "irb/completion"
|
Loading…
Reference in New Issue
Block a user