7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/shopify-cli/core/entry_point.rb', line 7
def call(args, ctx = Context.new)
begin
is_shell_shim = false
IO.open(9) { is_shell_shim = true }
rescue Errno::EBADF
rescue ArgumentError => e
unless e.message == 'The given fd is not accessible because RubyVM reserves it'
raise e
end
end
if !ctx.testing? && is_shell_shim
ctx.puts(ctx.message('core.warning.shell_shim'))
return
end
if ctx.development?
ctx.puts(
ctx.message('core.warning.development_version', File.join(ShopifyCli::ROOT, 'bin', ShopifyCli::TOOL_NAME))
)
else
new_version = ctx.new_version
ctx.puts(ctx.message('core.warning.new_version', ShopifyCli::VERSION, new_version)) unless new_version.nil?
end
ProjectType.load_type(Project.current_project_type)
task_registry = ShopifyCli::Tasks::Registry
command, command_name, args = ShopifyCli::Resolver.call(args)
executor = ShopifyCli::Core::Executor.new(ctx, task_registry, log_file: ShopifyCli.log_file)
ShopifyCli::Core::Monorail.log(command_name, args) do
executor.call(command, command_name, args)
end
end
|