8000 Remove some Platform.sh aliases to avoid confusion · symfony-cli/symfony-cli@3f91f02 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f91f02

Browse files
committed
Remove some Platform.sh aliases to avoid confusion
1 parent 5402fda commit 3f91f02

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

local/platformsh/commands.go

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

local/platformsh/generator/commands.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ func parseCommands(home string) (string, error) {
138138
if command.Name == "list" || command.Name == "help" {
139139
continue
140140
}
141+
if command.Name == "self:stats" {
142+
continue
143+
}
141144
if strings.HasPrefix(command.Name, "self:") {
142145
command.Hidden = true
143146
}
@@ -155,13 +158,15 @@ func parseCommands(home string) (string, error) {
155158
}
156159
name := strings.TrimPrefix("cloud:"+command.Name, namespace+":")
157160
aliases := []string{}
158-
if namespace != "cloud" {
161+
if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") {
159162
aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", command.Name))
160163
}
161164
for _, usage := range command.Usage {
162165
if allCommandNames[usage] {
163166
aliases = append(aliases, fmt.Sprintf("{Name: \"cloud:%s\"}", usage))
164-
aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", usage))
167+
if namespace != "cloud" && !strings.HasPrefix(command.Name, "self:") {
168+
aliases = append(aliases, fmt.Sprintf("{Name: \"%s\", Hidden: true}", usage))
169+
}
165170
}
166171
}
167172
if command.Name == "environment:push" {

0 commit comments

Comments
 (0)
0