diff --git a/dist/index.js b/dist/index.js index a744511..35f6a72 100644 --- a/dist/index.js +++ b/dist/index.js @@ -39793,6 +39793,7 @@ const cliCommand_1 = __nccwpck_require__(8344); const decompress_1 = __importDefault(__nccwpck_require__(9350)); async function CliDownloader(binaryDir) { const flagshipDir = 'flagship'; + const internalFlagshipDir = '.flagship'; const cliTar = `flagship/flagship-${cliCommand_1.CliVersion}.tar.gz`; async function installDir() { let platform = process.platform.toString(); @@ -39806,6 +39807,9 @@ async function CliDownloader(binaryDir) { if (!fs.existsSync(binaryDir)) { fs.mkdirSync(binaryDir); } + if (!fs.existsSync(internalFlagshipDir)) { + fs.mkdirSync(internalFlagshipDir); + } if (platform === 'win32') { platform = 'windows'; } @@ -39841,6 +39845,7 @@ async function CliDownloader(binaryDir) { } await (0, decompress_1.default)(cliTar, binaryDir); fs.chmodSync(`${binaryDir}/flagship`, '777'); + fs.chmodSync(`${internalFlagshipDir}`, '777'); } async function download() { await installDir(); diff --git a/src/cliDownloader.ts b/src/cliDownloader.ts index 7e021ca..a0dc69b 100644 --- a/src/cliDownloader.ts +++ b/src/cliDownloader.ts @@ -9,6 +9,7 @@ import decompress from 'decompress' export async function CliDownloader(binaryDir: string) { const flagshipDir = 'flagship' + const internalFlagshipDir = '.flagship' const cliTar = `flagship/flagship-${CliVersion}.tar.gz` async function installDir(): Promise { @@ -25,6 +26,10 @@ export async function CliDownloader(binaryDir: string) { fs.mkdirSync(binaryDir) } + if (!fs.existsSync(internalFlagshipDir)) { + fs.mkdirSync(internalFlagshipDir) + } + if (platform === 'win32') { platform = 'windows' } @@ -61,6 +66,7 @@ export async function CliDownloader(binaryDir: string) { } await decompress(cliTar, binaryDir) fs.chmodSync(`${binaryDir}/flagship`, '777') + fs.chmodSync(`${internalFlagshipDir}`, '777') } async function download(): Promise {