Skip to content

Commit

Permalink
try a fix for setting the GIT_ASKPASS envvar
Browse files Browse the repository at this point in the history
  • Loading branch information
rawlingsj committed May 25, 2018
1 parent cecc6a2 commit 1a031bb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ package main
import (
"errors"
"fmt"
"github.com/coreos/go-semver/semver"
"github.com/google/go-github/github"
version "github.com/hashicorp/go-version"
"io/ioutil"
"os"
"strings"

"github.com/coreos/go-semver/semver"
"github.com/google/go-github/github"
version "github.com/hashicorp/go-version"

"bufio"
"context"
"encoding/xml"
"flag"
"golang.org/x/oauth2"
"os/exec"
"path/filepath"
"regexp"
"sort"

"golang.org/x/oauth2"
)

type Project struct {
Expand Down Expand Up @@ -164,6 +166,7 @@ func getLatestTag(c config) (string, error) {
return "", errors.New(fmt.Sprint("error running git: %v", err))
}
cmd := exec.Command("git", "fetch", "--tags", "-v")
cmd.Env = append(cmd.Env, "GIT_ASKPASS="+os.Getenv("GIT_ASKPASS"))
err = cmd.Run()
if err != nil {
return "", errors.New(fmt.Sprint("error fetching tags: %v", err))
Expand Down

0 comments on commit 1a031bb

Please sign in to comment.