8000 Merge pull request #597 from tucksaun/feat/pie-work-locally · symfony-cli/symfony-cli@86ab161 · GitHub
[go: up one dir, main page]

Skip to content

Commit 86ab161

Browse files
authored
Merge pull request #597 from tucksaun/feat/pie-work-locally
Add PIE to the 'Work on a project locally' help section
2 parents af6f6b7 + ed39864 commit 86ab161

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

commands/root.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func CommonCommands() []*console.Command {
5252
localCommands := []*console.Command{
5353
binConsoleWrapper,
5454
composerWrapper,
55-
pieWrapper,
5655
phpWrapper,
5756
bookCheckReqsCmd,
5857
bookCheckoutCmd,

commands/wrappers.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,6 @@ var (
3737
return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony composer"`)}
3838
},
3939
}
40-
pieWrapper = &console.Command{
41-
Usage: "Runs PIE",
42-
Hidden: console.Hide,
43-
// we use an alias to avoid the command being shown in the help but
44-
// still be available for completion
45-
Aliases: []*console.Alias{{Name: "pie"}},
46-
Action: func(c *console.Context) error {
47-
return console.IncorrectUsageError{ParentError: errors.New(`This command can only be run as "symfony pie"`)}
48-
},
49-
}
5040
binConsoleWrapper = &console.Command{
5141
Usage: "Runs the Symfony Console (bin/console) for current project",
5242
Hidden: console.Hide,
@@ -65,12 +55,14 @@ var (
6555
// still be available for completion
6656
Aliases: func() []*console.Alias {
6757
binNames := php.GetBinaryNames()
68-
aliases := make([]*console.Alias, 0, len(binNames))
58+
aliases := make([]*console.Alias, 0, len(binNames)+1)
6959

7060
for _, name := range php.GetBinaryNames() {
7161
aliases = append(aliases, &console.Alias{Name: name})
7262
}
7363

64+
aliases = append(aliases, &console.Alias{Name: "pie"})
65+
7466
return aliases
7567
}(),
7668
Action: func(c *console.Context) error {

0 commit comments

Comments
 (0)
0