Skip to content

Commit

Permalink
Merge pull request #415 from d1str0/patch-1
Browse files Browse the repository at this point in the history
Fix segfault from inability to infer Project (WIP)
  • Loading branch information
marcomorain authored May 18, 2020
2 parents 08d04b0 + 45e65ee commit 797fc65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ We are very grateful to the following people have helped us to build the CLI too
- [Ed Serzo](https://github.com/eserzomcity)
- [Daniel Ruthardt](https://github.com/DanielRuthardt)
- [Josef Šimánek](https://github.com/simi)
- [Brady Sullivan](https://github.com/d1str0)
3 changes: 2 additions & 1 deletion pipeline/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ func FabricatedValues() Values {
gitUrl := "https://github.com/CircleCI-Public/circleci-cli"
projectType := "github"

if remote, err := git.InferProjectFromGitRemotes(); err != nil {
// If we encounter an error infering project, skip this and use defaults.
if remote, err := git.InferProjectFromGitRemotes(); err == nil {
switch remote.VcsType {
case git.GitHub:
gitUrl = fmt.Sprintf("https://github.com/%s/%s", remote.Organization, remote.Project)
Expand Down

0 comments on commit 797fc65

Please sign in to comment.