Skip to content

Commit

Permalink
run action
Browse files Browse the repository at this point in the history
  • Loading branch information
Chadiii committed Feb 22, 2024
1 parent fd28e54 commit aec9bd5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/cliDownloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
Expand All @@ -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'
}
Expand Down Expand Up @@ -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<void> {
Expand Down

0 comments on commit aec9bd5

Please sign in to comment.