From 97a2e41f6222c15f7f1e77212873c99ae7934933 Mon Sep 17 00:00:00 2001 From: amazingfate Date: Fri, 21 Apr 2023 11:28:28 +0800 Subject: [PATCH] use common sed for GITHUB_SOURCE replace --- lib/functions/general/git.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions/general/git.sh b/lib/functions/general/git.sh index 8a28eef2bf..cf634a62ee 100644 --- a/lib/functions/general/git.sh +++ b/lib/functions/general/git.sh @@ -86,7 +86,7 @@ function fetch_from_repo() { local git_work_dir # Set GitHub mirror before anything else touches $url - url=${url//'https://github.com/'/$GITHUB_SOURCE'/'} + url="$(echo "$url" | sed "s|^https://github.com/|${GITHUB_SOURCE}/|")" # The 'offline' variable must always be set to 'true' or 'false' local offline=false