Skip to content

Commit 4a6fea8

Browse files
committed
Add installation checks
1 parent c25ca34 commit 4a6fea8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
test:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: false
1213
matrix:
1314
os:
1415
- ubuntu-latest

src/setup.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,20 @@ async function installUnityEditor(unityHubPath, installPath, unityVersion, unity
8888
}
8989
await executeHub(unityHubPath, `install --version ${unityVersion} --changeset ${unityVersionChangeset}`);
9090
unityPath = await findUnity(unityHubPath, unityVersion);
91+
if (!unityPath) {
92+
throw new Error('unity editor installation failed');
93+
}
9194
}
9295
return unityPath;
9396
}
9497

9598
async function installUnityModules(unityHubPath, unityVersion, unityModules, unityModulesChild) {
9699
const modulesArgs = unityModules.map(s => `--module ${s.toLowerCase()}`).join(' ');
97100
const childModulesArg = unityModulesChild ? '--childModules' : '';
98-
await executeHub(unityHubPath, `install-modules --version ${unityVersion} ${modulesArgs} ${childModulesArg}`);
101+
const stdout = await executeHub(unityHubPath, `install-modules --version ${unityVersion} ${modulesArgs} ${childModulesArg}`);
102+
if (!stdout.includes('successfully')) {
103+
throw new Error('unity modules installation failed');
104+
}
99105
}
100106

101107
async function postInstall() {

0 commit comments

Comments
 (0)