From 8024bd3bf5f02840e1acba8015abef8a6c08af13 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 13 Jun 2022 16:01:44 -0700 Subject: [PATCH] Clean up names in funcspec helpers --- plugins/commands/serve/util/func_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/commands/serve/util/func_spec.rb b/plugins/commands/serve/util/func_spec.rb index 1d7a1e79a..e007a9676 100644 --- a/plugins/commands/serve/util/func_spec.rb +++ b/plugins/commands/serve/util/func_spec.rb @@ -101,7 +101,7 @@ module VagrantPlugins module Service def funcspec(args: [], named: {}, name: nil, result: nil) if name.nil? - name = caller_locations.first.label.to_s + name = caller_locations[1].label.to_s if name.end_with?("!") || name.end_with?("?") name = name[0, name.length - 1] end @@ -124,7 +124,7 @@ module VagrantPlugins result = make_proto(result) SDK::FuncSpec.new( - name: name, + name: name.to_s.sub(/_spec$/, ""), args: fargs, result: [ SDK::FuncSpec::Value.new(