Skip to content

Commit d774c52

Browse files
committed
feat: add retry to android studio download
1 parent d4d8cdc commit d774c52

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "default",
3-
"version": "1.12.0-beta.5",
3+
"version": "1.12.0-beta.6",
44
"description": "Default plugin for Codify - provides 50+ declarative resources for managing development tools and system configuration across macOS and Linux",
55
"main": "dist/index.js",
66
"scripts": {

src/resources/android/android-studios/android-studio.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class AndroidStudioResource extends Resource<AndroidStudioConfig> {
143143
const temporaryDir = await fs.mkdtemp(path.join(os.tmpdir(), 'codify-android-'))
144144

145145
try {
146-
await $.spawn(`curl -fsSL ${downloadLink.link} -o android-studio.dmg`, { cwd: temporaryDir });
146+
await $.spawn(`curl -fsSL --retry 5 --retry-delay 3 --retry-connrefused ${downloadLink.link} -o android-studio.dmg`, { cwd: temporaryDir });
147147
const mountedDir = '/Volumes/android-studio'
148148

149149
const { data } = await $.spawn('hdiutil attach android-studio.dmg -mountpoint "/Volumes/android-studio"', { cwd: temporaryDir });
@@ -189,7 +189,7 @@ export class AndroidStudioResource extends Resource<AndroidStudioConfig> {
189189
const temporaryDir = await fs.mkdtemp(path.join(os.tmpdir(), 'codify-android-'))
190190

191191
try {
192-
await $.spawn(`curl -fsSL ${downloadLink.link} -o android-studio.tar.gz`, { cwd: temporaryDir });
192+
await $.spawn(`curl -fsSL --retry 5 --retry-delay 3 --retry-connrefused ${downloadLink.link} -o android-studio.tar.gz`, { cwd: temporaryDir });
193193
await $.spawn(`tar -xzf android-studio.tar.gz`, { cwd: temporaryDir });
194194

195195
// Remove existing install if present

0 commit comments

Comments
 (0)