mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
vjudge: add CheckService (#599)
This commit is contained in:
1 parent
807bfb53e3
commit
9da4340a97
8 files changed
+129
-62
No files matched your search
@@ -45,7 +45,7 @@ export function register(cli: CAC) {
|
||||
const url = new URL(src);
|
||||
const filename = url.pathname.split('/').pop()!;
|
||||
if (['.tar.gz', '.tgz', '.zip'].find((i) => filename.endsWith(i))) {
|
||||
const name = filename.replace(/(-?\d+\.\d+\.\d+)?(\.tar\.gz|\.zip|\.tgz)$/g, '');
|
||||
const name = filename.replace(/(-?(\d+\.\d+\.\d+|latest))?(\.tar\.gz|\.zip|\.tgz)$/g, '');
|
||||
newAddonPath = path.join(addonDir, name);
|
||||
logger.info(`Downloading ${src} to ${newAddonPath}`);
|
||||
fs.ensureDirSync(newAddonPath);
|
||||
|
||||
Reference in new issue
Block a user