Skip to content

Commit e7bd093

Browse files
committed
use full name in the self sm-plugin list command
1 parent b969046 commit e7bd093

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

cli/self/list.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,9 @@ func NewListCommand(cliContext cli.Cli) *cobra.Command {
4141
}
4242

4343
name := strings.TrimPrefix(currentContainer.Name, "/")
44-
version := formatImageName(currentContainer.Config.Image)
44+
version := currentContainer.Config.Image
4545
_, wErr := fmt.Fprintf(cmd.OutOrStdout(), "%s\t%s\n", name, version)
4646
return wErr
4747
},
4848
}
4949
}
50-
51-
func formatImageName(v string) string {
52-
if i := strings.LastIndex(v, "/"); i > -1 && i < len(v)-1 {
53-
return v[i+1:]
54-
}
55-
return v
56-
}

0 commit comments

Comments
 (0)