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