@@ -58,11 +58,13 @@ var linkCmd = &cobra.Command{
5858 // concatenate personal and team projects
5959 projects := prepareAppList (user )
6060
61- // add the option of a new project to the existing selection payload
62- projects = append (projects , nhost.App {
63- Name : "Create New App" ,
64- ID : "new" ,
65- })
61+ /*
62+ // add the option of a new project to the existing selection payload
63+ projects = append(projects, nhost.App{
64+ Name: "Create New App",
65+ ID: "new",
66+ })
67+ */
6668
6769 // configure interactive prompt template
6870 templates := promptui.SelectTemplates {
@@ -91,8 +93,7 @@ var linkCmd = &cobra.Command{
9193
9294 index , _ , err := prompt .Run ()
9395 if err != nil {
94- log .Debug (err )
95- os .Exit (0 )
96+ return
9697 }
9798
9899 project := projects [index ]
@@ -102,7 +103,6 @@ var linkCmd = &cobra.Command{
102103 if project .ID == "new" {
103104
104105 // input the project name
105-
106106 names := []string {}
107107
108108 for _ , project := range projects {
@@ -161,7 +161,7 @@ var linkCmd = &cobra.Command{
161161
162162 index , _ , err = prompt .Run ()
163163 if err != nil {
164- os . Exit ( 0 )
164+ return
165165 }
166166
167167 if index == 0 {
@@ -206,7 +206,7 @@ var linkCmd = &cobra.Command{
206206 } else {
207207
208208 if err != nil {
209- os . Exit ( 0 )
209+ return
210210 }
211211
212212 // provide confirmation prompt
@@ -220,7 +220,7 @@ var linkCmd = &cobra.Command{
220220
221221 response , err := confirmationPrompt .Run ()
222222 if err != nil {
223- os . Exit ( 0 )
223+ return
224224 }
225225
226226 if strings .ToLower (response ) != project .Name {
0 commit comments