Skip to content

Commit 401dc69

Browse files
committed
Fixed the application not exiting when given "n" to proceed
1 parent 4f187cf commit 401dc69

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

commands/remove_tables.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ func RemoveTables(inputPath string, outputPath string, tables []string) {
2828

2929
c = strings.TrimSpace(c)
3030

31-
if c != "Y" {
31+
if strings.ToLower(c) != "y" {
3232
fmt.Println("Exiting, no action performed")
33+
return
3334
} else {
3435
fmt.Println("Processing...\n")
3536
}
@@ -40,8 +41,6 @@ func RemoveTables(inputPath string, outputPath string, tables []string) {
4041
w, fw := io.GetWriter(outputPath)
4142
defer fw.Close()
4243

43-
//skipping := false
44-
4544
replaceRegex := regexp.MustCompile(fmt.Sprintf(parser.TableStructureRegexReplace, strings.Join(tables, "|")))
4645

4746
skipping := false

0 commit comments

Comments
 (0)