Skip to content

Commit

Permalink
Fix github deploy without a checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaHegde committed Dec 30, 2024
1 parent 33dc7d6 commit daf61c2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cli/cmd/project/connect_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,18 @@ func ConnectGithubFlow(ctx context.Context, ch *cmdutil.Helper, opts *DeployOpts
}
}

// If the Git path is local, we'll do some extra steps to infer the githubURL.
localGitPath, localProjectPath, err := ValidateLocalProject(ch, opts.GitPath, opts.SubPath)
if err != nil {
if errors.Is(err, ErrInvalidProject) {
return nil
var localGitPath string
var localProjectPath string
var err error
if isLocalGitPath {
// If the Git path is local, we'll do some extra steps to infer the githubURL.
localGitPath, localProjectPath, err = ValidateLocalProject(ch, opts.GitPath, opts.SubPath)
if err != nil {
if errors.Is(err, ErrInvalidProject) {
return nil
}
return err
}
return err
}

if ch.Org != "" {
Expand Down

0 comments on commit daf61c2

Please sign in to comment.