mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-11 19:05:20 +08:00
修复定时任务脚本跳转
This commit is contained in:
+3
-4
@@ -281,7 +281,9 @@ export function getCommandScript(
|
||||
command: string,
|
||||
): [string, string] | string | undefined {
|
||||
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) =>
|
||||
['.js', '.ts', '.sh', '.py'].some((y) => x.endsWith(y)),
|
||||
);
|
||||
@@ -300,7 +302,4 @@ export function getCommandScript(
|
||||
p = '';
|
||||
}
|
||||
return [s, p];
|
||||
} else if (cmd[1] === 'repo') {
|
||||
return cmd[2];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user