mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-12 03:10:48 +08:00
修复定时任务脚本跳转
This commit is contained in:
+3
-4
@@ -281,7 +281,9 @@ export function getCommandScript(
|
|||||||
command: string,
|
command: string,
|
||||||
): [string, string] | string | undefined {
|
): [string, string] | string | undefined {
|
||||||
const cmd = command.split(' ') as string[];
|
const cmd = command.split(' ') as string[];
|
||||||
if (cmd[0] === 'task') {
|
if (cmd[1] === 'repo' || cmd[1] === 'raw') {
|
||||||
|
return cmd[2];
|
||||||
|
}
|
||||||
let scriptsPart = cmd.find((x) =>
|
let scriptsPart = cmd.find((x) =>
|
||||||
['.js', '.ts', '.sh', '.py'].some((y) => x.endsWith(y)),
|
['.js', '.ts', '.sh', '.py'].some((y) => x.endsWith(y)),
|
||||||
);
|
);
|
||||||
@@ -300,7 +302,4 @@ export function getCommandScript(
|
|||||||
p = '';
|
p = '';
|
||||||
}
|
}
|
||||||
return [s, p];
|
return [s, p];
|
||||||
} else if (cmd[1] === 'repo') {
|
|
||||||
return cmd[2];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user