Skip to content

Commit a59e86a

Browse files
committed
Hard code mount point
1 parent 3855905 commit a59e86a

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/run-all-unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
export PATH=/Users/runner/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/opt/curl/bin:/usr/local/bin:/usr/local/sbin:/Users/runner/bin:/usr/bin:/bin:/usr/sbin:/sbin
5151
export CI=true
5252
53-
npm run test -- ./test/android ./test/homebrew/custom-install.test.ts --no-file-parallelism --disable-console-intercept
53+
npm run test -- ./test/android --no-file-parallelism --disable-console-intercept
5454
5555
- name: Run tests (Linux)
5656
if: runner.os == 'Linux'

src/resources/android/android-studio.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,16 @@ export class AndroidStudioResource extends Resource<AndroidStudioConfig> {
144144

145145
try {
146146
await $.spawn(`curl -fsSL ${downloadLink.link} -o android-studio.dmg`, { cwd: temporaryDir });
147+
const mountedDir = '/Volumes/android-studio'
147148

148-
const { data } = await $.spawn('hdiutil attach android-studio.dmg', { cwd: temporaryDir });
149-
const mountedDir = data.split(/\n/)
149+
const { data } = await $.spawn('hdiutil attach android-studio.dmg -mountpoint "/Volumes/android-studio"', { cwd: temporaryDir });
150+
const mountData = data.split(/\n/)
150151
.find((l) => l.includes('/Volumes/'))
151152
?.split(' ')
152153
?.at(-1)
153154
?.trim()
154155

155-
if (!mountedDir) {
156+
if (!mountData) {
156157
throw new Error('Unable to mount dmg or find the mounted volume')
157158
}
158159

0 commit comments

Comments
 (0)