Skip to content

Commit 1fe0f0f

Browse files
committed
Create emulator with ability to overwrite
This is necessary on a custom runner, when previous job failed
1 parent 7657cd1 commit 1fe0f0f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

emulator-run-cmd/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
123123
additionalOptions += `--device ${hardwareProfile}`
124124
}
125125

126-
await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
126+
await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --force --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
127127
return new Emulator(this, name, api, abi, tag, this.portCounter++, this.portCounter++)
128128
}
129129

install-sdk/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export abstract class BaseAndroidSdk implements AndroidSDK {
124124
additionalOptions += `--device ${hardwareProfile}`
125125
}
126126

127-
await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
127+
await execIgnoreFailure(`bash -c \\\"echo -n no | ${this.androidHome()}/cmdline-tools/bootstrap-version/bin/avdmanager create avd -n ${name} --force --package \\\"system-images;android-${api};${tag};${abi}\\\" --tag ${tag}\" ${additionalOptions}`)
128128
return new Emulator(this, name, api, abi, tag, this.portCounter++, this.portCounter++)
129129
}
130130

0 commit comments

Comments
 (0)