Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions cmd/step/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

import (
"os"

"github.com/smallstep/certificates/ca"
"github.com/smallstep/cli-utils/step"

Expand All @@ -27,5 +25,5 @@
}

func main() {
os.Exit(cmd.Run())
cmd.Run()

Check warning on line 28 in cmd/step/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/step/main.go#L28

Added line #L28 was not covered by tests
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/manifoldco/promptui v0.9.0
github.com/pkg/errors v0.9.1
github.com/pquerna/otp v1.5.0
github.com/rogpeppe/go-internal v1.13.1
github.com/rogpeppe/go-internal v1.14.1
github.com/slackhq/nebula v1.9.5
github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262
github.com/smallstep/certificates v0.28.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI=
github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rs/xid v1.6.0 h1:fV591PaemRlL6JfRxGDEPl69wICngIQ3shQtzfy2gxU=
github.com/rs/xid v1.6.0/go.mod h1:7XoLgs4eV+QndskICGsho+ADou8ySMSjJKDIan90Nz0=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
Expand Down
5 changes: 2 additions & 3 deletions integration/shared_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package integration

import (
"os"
"testing"

"github.com/rogpeppe/go-internal/testscript"
Expand All @@ -10,7 +9,7 @@ import (
)

func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{
testscript.Main(m, map[string]func(){
"step": cmd.Run, // main entrypoint name
}))
})
}
10 changes: 7 additions & 3 deletions internal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@
_ "github.com/smallstep/cli/command/ssh"
)

func Run() int {
func Run() {
os.Exit(run())

Check warning on line 47 in internal/cmd/root.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/root.go#L46-L47

Added lines #L46 - L47 were not covered by tests
}

func run() int {
defer panicHandler()

Check warning on line 52 in internal/cmd/root.go

View check run for this annotation

Codecov / codecov/patch

internal/cmd/root.go#L50-L52

Added lines #L50 - L52 were not covered by tests
// initialize step environment.
if err := step.Init(); err != nil {
fmt.Fprintln(os.Stderr, err.Error())
return 1
}

defer panicHandler()

// create new instance of app
app := newApp(os.Stdout, os.Stderr)

Expand Down