Don't prepend server URL if its an empty string
Instead of getting the URL "https://" which causes some actions to fail, they will now get the empty string if no instance is set (such as when running `exec`). Some github.com/actions actions such as cache fail with cryptic errors with an invalid URL
This commit is contained in:
parent
02247b852a
commit
5163d401dc
1 changed files with 1 additions and 1 deletions
|
|
@ -1355,7 +1355,7 @@ func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubCon
|
|||
|
||||
{ // Adapt to Forgejo
|
||||
instance := rc.Config.GitHubInstance
|
||||
if !strings.HasPrefix(instance, "http://") &&
|
||||
if instance != "" && !strings.HasPrefix(instance, "http://") &&
|
||||
!strings.HasPrefix(instance, "https://") {
|
||||
instance = "https://" + instance
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue