mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 07:16:08 +08:00
修复定时任务脚本跳转
This commit is contained in:
parent
8ad26267d8
commit
633b30269c
|
@ -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];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user