mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-14 19:35:12 -05:00
fix: github hostname regex
This commit is contained in:
parent
8cd75c52e3
commit
fdfaf6b72b
2 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
Running "sparo clone __GITHUB_HOSTNAME__:tiktok/sparo.git --branch build-test":
|
||||
Running "sparo clone __GITHUB_HOSTNAME__tiktok/sparo.git --branch build-test":
|
||||
|
||||
[1mSparo accelerator for Git __VERSION__ -[22m[36m https://tiktok.github.io/sparo/[39m
|
||||
Node.js version is __VERSION__ (LTS)
|
||||
|
|
|
@ -264,7 +264,7 @@ function processSparoOutput(text: string, workingDirectory: string): string {
|
|||
replaceDurationString,
|
||||
replaceWorkingDirectoryPath,
|
||||
replaceFolderCountString,
|
||||
replaceGitHostname
|
||||
replaceGitHubHostname
|
||||
].reduce((text, fn) => fn(text, workingDirectory), text);
|
||||
}
|
||||
/**
|
||||
|
@ -292,10 +292,10 @@ function replaceFolderCountString(text: string): string {
|
|||
return text.replace(/Checking out \d+ folders/g, 'Checking out __FOLDER_COUNT__ folders');
|
||||
}
|
||||
/**
|
||||
* Replace "https://github.com" and "git@github.com" with "__GITHUB_HOSTNAME__".
|
||||
* Replace "https://github.com/" and "git@github.com:" with "__GITHUB_HOSTNAME__".
|
||||
*/
|
||||
function replaceGitHostname(text: string): string {
|
||||
return text.replace(/(https?:\/\/|git\@)github\.com/g, '__GITHUB_HOSTNAME__');
|
||||
function replaceGitHubHostname(text: string): string {
|
||||
return text.replace(/(https?:\/\/|git\@)github\.com[/:]/g, '__GITHUB_HOSTNAME__');
|
||||
}
|
||||
|
||||
async function* enumerateFolderPaths(
|
||||
|
|
Loading…
Reference in a new issue