This commit is contained in:
xiaojunnuo
2024-11-01 02:59:36 +08:00
parent 01f61d3c73
commit 8c7f976ef5
2 changed files with 8 additions and 2 deletions
@@ -131,8 +131,14 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
if (!fs.existsSync(legoPath)) {
//解压缩
if (os_type === "linux") {
//判断当前是arm64 还是amd64
const arch = process.arch;
let platform = "amd64";
if (arch === "arm64" || arch === "arm") {
platform = "arm64";
}
await utils.sp.spawn({
cmd: "tar -zxvf ./tools/linux/lego_*.tar.gz -C ./tools/linux/",
cmd: `tar -zxvf ./tools/linux/lego_linux_${platform}.tar.gz -C ./tools/linux/`,
});
this.logger.info("解压lego成功");
} else {