Skip to content

Commit

Permalink
Add installation checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kuler90 committed Nov 13, 2020
1 parent c25ca34 commit 4a6fea8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
Expand Down
8 changes: 7 additions & 1 deletion src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,20 @@ async function installUnityEditor(unityHubPath, installPath, unityVersion, unity
}
await executeHub(unityHubPath, `install --version ${unityVersion} --changeset ${unityVersionChangeset}`);
unityPath = await findUnity(unityHubPath, unityVersion);
if (!unityPath) {
throw new Error('unity editor installation failed');
}
}
return unityPath;
}

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

async function postInstall() {
Expand Down

0 comments on commit 4a6fea8

Please sign in to comment.