@@ -10,18 +10,13 @@ import (
10
10
"github.com/tarantool/tt/cli/util"
11
11
)
12
12
13
- var (
14
- programName string
15
- )
16
-
17
13
// newUninstallTtCmd creates a command to install tt.
18
14
func newUninstallTtCmd () * cobra.Command {
19
15
var tntCmd = & cobra.Command {
20
16
Use : "tt [version]" ,
21
17
Short : "Uninstall tt" ,
22
18
Run : func (cmd * cobra.Command , args []string ) {
23
19
cmdCtx .CommandName = cmd .Name ()
24
- programName = cmd .Name ()
25
20
err := modules .RunCmd (& cmdCtx , cmd .CommandPath (), & modulesInfo ,
26
21
InternalUninstallModule , args )
27
22
util .HandleCmdErr (cmd , err )
@@ -48,7 +43,6 @@ func newUninstallTarantoolCmd() *cobra.Command {
48
43
Short : "Uninstall tarantool community edition" ,
49
44
Run : func (cmd * cobra.Command , args []string ) {
50
45
cmdCtx .CommandName = cmd .Name ()
51
- programName = cmd .Name ()
52
46
err := modules .RunCmd (& cmdCtx , cmd .CommandPath (), & modulesInfo ,
53
47
InternalUninstallModule , args )
54
48
util .HandleCmdErr (cmd , err )
@@ -75,7 +69,6 @@ func newUninstallTarantoolEeCmd() *cobra.Command {
75
69
Short : "Uninstall tarantool enterprise edition" ,
76
70
Run : func (cmd * cobra.Command , args []string ) {
77
71
cmdCtx .CommandName = cmd .Name ()
78
- programName = cmd .Name ()
79
72
err := modules .RunCmd (& cmdCtx , cmd .CommandPath (), & modulesInfo ,
80
73
InternalUninstallModule , args )
81
74
util .HandleCmdErr (cmd , err )
@@ -102,7 +95,6 @@ func newUninstallTarantoolDevCmd() *cobra.Command {
102
95
Short : "Uninstall tarantool-dev" ,
103
96
Run : func (cmd * cobra.Command , args []string ) {
104
97
cmdCtx .CommandName = cmd .Name ()
105
- programName = cmd .Name ()
106
98
err := modules .RunCmd (& cmdCtx , cmd .CommandPath (), & modulesInfo ,
107
99
InternalUninstallModule , args )
108
100
util .HandleCmdErr (cmd , err )
@@ -139,6 +131,7 @@ func InternalUninstallModule(cmdCtx *cmdcontext.CmdCtx, args []string) error {
139
131
return errNoConfig
140
132
}
141
133
134
+ programName := cmdCtx .CommandName
142
135
programVersion := ""
143
136
if len (args ) == 1 {
144
137
programVersion = args [0 ]
0 commit comments