@@ -996,7 +996,7 @@ const exec_1 = __nccwpck_require__(5236);
996
996
const os = __importStar(__nccwpck_require__(857));
997
997
const path = __importStar(__nccwpck_require__(6928));
998
998
const assert_1 = __nccwpck_require__(2613);
999
- const fs_1 = __nccwpck_require__(9896) ;
999
+ // import { promises as fs } from "fs" ;
1000
1000
class Packages {
1001
1001
constructor(_lazarusVersion, baseUrl, jsonParam) {
1002
1002
this.platform = os.platform();
@@ -1055,8 +1055,8 @@ class Packages {
1055
1055
const pkgFile = await this._download(pkg.RepositoryFileName);
1056
1056
const pkgFolder = await this._extract(pkgFile, path.join(this._getTempDirectory(), pkg.RepositoryFileHash));
1057
1057
core.info(`Unzipped to: "${pkgFolder}/${pkg.PackageBaseDir}"`);
1058
- await (0, exec_1. exec) (`rm -rf ${pkgFile}`);
1059
- await this._clearDirectory(pkgFolder);
1058
+ // await exec(`rm -rf ${pkgFile}`);
1059
+ // await this._clearDirectory(pkgFolder);
1060
1060
await this._installLpkFiles(pkgFolder, pkg);
1061
1061
}
1062
1062
catch (error) {
@@ -1086,19 +1086,22 @@ class Packages {
1086
1086
core.info(`_download: Downloading ${this.baseUrl}/${filename} to ${downloadPath}`);
1087
1087
return tc.downloadTool(`${this.baseUrl}/${filename}`, downloadPath);
1088
1088
}
1089
- async _clearDirectory(dirPath) {
1090
- core.info(`_clearDirectory: Clearing ${dirPath}`);
1091
- if (await fs_1.promises
1092
- .access(dirPath)
1093
- .then(() => true)
1094
- .catch(() => false)) {
1095
- const files = await fs_1.promises.readdir(dirPath);
1096
- await Promise.all(files.map((file) => fs_1.promises.unlink(path.join(dirPath, file))));
1097
- }
1098
- else {
1099
- await fs_1.promises.mkdir(dirPath);
1100
- }
1101
- }
1089
+ // private async _clearDirectory(dirPath: string): Promise<void> {
1090
+ // core.info(`_clearDirectory: Clearing ${dirPath}`);
1091
+ // if (
1092
+ // await fs
1093
+ // .access(dirPath)
1094
+ // .then(() => true)
1095
+ // .catch(() => false)
1096
+ // ) {
1097
+ // const files = await fs.readdir(dirPath);
1098
+ // await Promise.all(
1099
+ // files.map((file) => fs.unlink(path.join(dirPath, file)))
1100
+ // );
1101
+ // } else {
1102
+ // await fs.mkdir(dirPath);
1103
+ // }
1104
+ // }
1102
1105
async _getPackageList(repoURL) {
1103
1106
core.info(`_getPackageList: Fetching package list from ${repoURL}`);
1104
1107
try {
0 commit comments