aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bridge/github/config.go4
-rw-r--r--commands/bridge_configure.go7
-rw-r--r--commands/bridge_rm.go2
3 files changed, 10 insertions, 3 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go
index 4a3bddfb..b5468846 100644
--- a/bridge/github/config.go
+++ b/bridge/github/config.go
@@ -98,7 +98,7 @@ func (*Github) Configure(repo repository.RepoCommon, params core.BridgeParams) (
return nil, err
}
if !ok {
- return nil, fmt.Errorf("project doesn't exist or authentication token has a wrong scope")
+ return nil, fmt.Errorf("project doesn't exist or authentication token has an incorrect scope")
}
conf[keyToken] = token
@@ -428,7 +428,7 @@ func splitURL(url string) (owner string, project string, err error) {
owner = res[1]
project = res[2]
- return owner, project, nil
+ return
}
func getValidGithubRemoteURLs(remotes map[string]string) []string {
diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go
index c9ac1680..169919f6 100644
--- a/commands/bridge_configure.go
+++ b/commands/bridge_configure.go
@@ -33,6 +33,13 @@ func runBridgeConfigure(cmd *cobra.Command, args []string) error {
defer backend.Close()
interrupt.RegisterCleaner(backend.Close)
+ termState, err := terminal.GetState(int(syscall.Stdin))
+ if err != nil {
+ return err
+ }
+ interrupt.RegisterCleaner(func() error {
+ return terminal.Restore(int(syscall.Stdin), termState)
+ })
if bridgeConfigureTarget == "" {
bridgeConfigureTarget, err = promptTarget()
if err != nil {
diff --git a/commands/bridge_rm.go b/commands/bridge_rm.go
index 1b67608b..80a831ff 100644
--- a/commands/bridge_rm.go
+++ b/commands/bridge_rm.go
@@ -24,7 +24,7 @@ func runBridgeRm(cmd *cobra.Command, args []string) error {
}
var bridgeRmCmd = &cobra.Command{
- Use: "rm <name>",
+ Use: "rm name <name>",
Short: "Delete a configured bridge.",
PreRunE: loadRepo,
RunE: runBridgeRm,