forked from runatlantis/atlantis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request runatlantis#170 from hootsuite/flags
Test cmd/server
- Loading branch information
Showing
9 changed files
with
485 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/hootsuite/atlantis/bootstrap" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bootstrapCmd = &cobra.Command{ | ||
Use: "bootstrap", | ||
Short: "Start a guided tour of Atlantis", | ||
RunE: withErrPrint(func(cmd *cobra.Command, args []string) error { | ||
return bootstrap.Start() | ||
}), | ||
} | ||
// BootstrapCmd starts the bootstrap process for testing out Atlantis. | ||
type BootstrapCmd struct{} | ||
|
||
func init() { | ||
RootCmd.AddCommand(bootstrapCmd) | ||
// Init returns the runnable cobra command. | ||
func (b *BootstrapCmd) Init() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "bootstrap", | ||
Short: "Start a guided tour of Atlantis", | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
err := bootstrap.Start() | ||
fmt.Fprintf(os.Stderr, "\033[31mError: %s\033[39m\n\n", err.Error()) | ||
return err | ||
}, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.