Skip to content

Commit

Permalink
fix: nil pointer in saucectl configure command (#987)
Browse files Browse the repository at this point in the history
* fix: nil pointer in saucectl configure command

* ci: test saucectl configure e2e
  • Loading branch information
alexplischke authored Dec 4, 2024
1 parent 7f0aae3 commit 3637d90
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ jobs:
saucectl
saucectl.exe
test-configure:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Download saucectl Binary
uses: actions/download-artifact@v4
with:
name: saucectlbin

- name: Set Permissions
run: chmod +x ./saucectl

- name: Saucectl Configure
run: ./saucectl configure -u $SAUCE_USERNAME -a $SAUCE_ACCESS_KEY

puppeteer-replay:
needs: build
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion internal/cmd/configure/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func Command() *cobra.Command {
go func() {
tracker.Collect(
cmds.FullName(cmd),
nil,
)
_ = tracker.Close()
}()
Expand Down
4 changes: 3 additions & 1 deletion internal/usage/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ func (c *Client) Collect(subject string, opts ...Option) {
Set("ci", ci.GetProvider().Name)

for _, opt := range opts {
opt(p)
if opt != nil {
opt(p)
}
}

userID := credentials.Get().Username
Expand Down

0 comments on commit 3637d90

Please sign in to comment.