From afbaaec68acaac8b9927af7d1b48a1ec06328a9f Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sat, 16 Mar 2024 17:32:02 -0400 Subject: [PATCH] handle quitting prompt --- cmd/sst/init.go | 5 +++-- examples/test/sst.config.ts | 12 ------------ 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 examples/test/sst.config.ts diff --git a/cmd/sst/init.go b/cmd/sst/init.go index 77540ad3..b2607558 100644 --- a/cmd/sst/init.go +++ b/cmd/sst/init.go @@ -10,6 +10,7 @@ import ( "github.com/briandowns/spinner" "github.com/fatih/color" "github.com/manifoldco/promptui" + "github.com/sst/ion/internal/util" "github.com/sst/ion/pkg/project" ) @@ -72,7 +73,7 @@ func CmdInit(cli *Cli) error { _, confirm, err := p.Run() if err != nil { - return err + return util.NewReadableError(err, "") } if confirm == "No" { return nil @@ -92,7 +93,7 @@ func CmdInit(cli *Cli) error { } _, home, err = p.Run() if err != nil { - return err + return util.NewReadableError(err, "") } } diff --git a/examples/test/sst.config.ts b/examples/test/sst.config.ts deleted file mode 100644 index 8df21e3c..00000000 --- a/examples/test/sst.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -/// - -export default $config({ - app(input) { - return { - name: "test", - removal: input?.stage === "production" ? "retain" : "remove", - home: "aws", - }; - }, - async run() {}, -});