From 6dd7d952d211b9f9cf5d78eadf6a754d4bb683b7 Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Thu, 23 Jan 2020 13:57:24 -0800 Subject: [PATCH 1/4] fix regex --- bats/no-repo.bats | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bats/no-repo.bats b/bats/no-repo.bats index c5da6287166..d8669574f33 100755 --- a/bats/no-repo.bats +++ b/bats/no-repo.bats @@ -47,8 +47,8 @@ teardown() { } @test "testing dolt version output" { - run dolt version - [ "$status" -eq 0 ] + dolt version > version.txt + run grep -E "dolt version \d+.\d+.\d+" version.txt [[ "$output" =~ "dolt version " ]] || false } From d2f2c7bf2448d6a38caa1d413754d6e1b414e35e Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Thu, 23 Jan 2020 14:14:53 -0800 Subject: [PATCH 2/4] simplified --- bats/no-repo.bats | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bats/no-repo.bats b/bats/no-repo.bats index d8669574f33..db377196c82 100755 --- a/bats/no-repo.bats +++ b/bats/no-repo.bats @@ -47,9 +47,7 @@ teardown() { } @test "testing dolt version output" { - dolt version > version.txt - run grep -E "dolt version \d+.\d+.\d+" version.txt - [[ "$output" =~ "dolt version " ]] || false + dolt version | grep -E "dolt version \d+.\d+.\d+" } From d886408e6fd9cfb425167acdd592f3ebadfad0fa Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Thu, 23 Jan 2020 14:23:46 -0800 Subject: [PATCH 3/4] final form --- bats/no-repo.bats | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bats/no-repo.bats b/bats/no-repo.bats index db377196c82..086f8bea989 100755 --- a/bats/no-repo.bats +++ b/bats/no-repo.bats @@ -47,7 +47,10 @@ teardown() { } @test "testing dolt version output" { - dolt version | grep -E "dolt version \d+.\d+.\d+" + run dolt version + [ "$status" -eq 0 ] + regex='dolt version [0-9]+.[0-9]+.[0-9]+' + [[ "$output" =~ $regex ]] || false } From 09bac88738f6707e757b431201d7576c43dcfeed Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Fri, 24 Jan 2020 14:23:57 -0800 Subject: [PATCH 4/4] go vet yourself --- go/cmd/dolt/dolt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/cmd/dolt/dolt.go b/go/cmd/dolt/dolt.go index 60d02051724..e05c4346716 100644 --- a/go/cmd/dolt/dolt.go +++ b/go/cmd/dolt/dolt.go @@ -64,7 +64,7 @@ var doltCommand = cli.NewSubCommandHandler("dolt", "it's git for data", []cli.Co commands.CloneCmd{}, credcmds.Commands, commands.LoginCmd{}, - commands.VersionCmd{Version}, + commands.VersionCmd{VersionStr: Version}, commands.ConfigCmd{}, commands.LsCmd{}, schcmds.Commands,