Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bigtable): replace unsafe exec in cbt #3591

Merged
merged 2 commits into from Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions bigtable/go.mod
Expand Up @@ -10,6 +10,7 @@ require (
github.com/googleapis/gax-go/v2 v2.0.5
golang.org/x/mod v0.4.1 // indirect
golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4
golang.org/x/tools v0.1.0 // indirect
google.golang.org/api v0.36.0
google.golang.org/genproto v0.0.0-20210119180700-e258113e47cc
Expand Down
4 changes: 2 additions & 2 deletions bigtable/internal/cbtconfig/cbtconfig.go
Expand Up @@ -28,13 +28,13 @@ import (
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"time"

"golang.org/x/oauth2"
"golang.org/x/sys/execabs"
"google.golang.org/grpc/credentials"
)

Expand Down Expand Up @@ -211,7 +211,7 @@ func (g *GcloudCmdTokenSource) Token() (*oauth2.Token, error) {
// LoadGcloudConfig retrieves the gcloud configuration values we need use via the
// 'config-helper' command
func LoadGcloudConfig(gcloudCmd string, gcloudCmdArgs []string) (*GcloudConfig, error) {
out, err := exec.Command(gcloudCmd, gcloudCmdArgs...).Output()
out, err := execabs.Command(gcloudCmd, gcloudCmdArgs...).Output()
if err != nil {
return nil, fmt.Errorf("Could not retrieve gcloud configuration")
}
Expand Down