11
dist/index.js
generated
vendored
11
dist/index.js
generated
vendored
@@ -6996,10 +6996,10 @@ const node_fs_1 = __importDefault(__nccwpck_require__(87561));
|
||||
class SetupMac {
|
||||
static async setup(buildParameters, actionFolder) {
|
||||
const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;
|
||||
if (!node_fs_1.default.existsSync(this.unityHubExecPath)) {
|
||||
if (!node_fs_1.default.existsSync(this.unityHubExecPath.replace(/"/g, ''))) {
|
||||
await SetupMac.installUnityHub(buildParameters);
|
||||
}
|
||||
if (!node_fs_1.default.existsSync(unityEditorPath)) {
|
||||
if (!node_fs_1.default.existsSync(unityEditorPath.replace(/"/g, ''))) {
|
||||
await SetupMac.installUnity(buildParameters);
|
||||
}
|
||||
await SetupMac.setEnvironmentVariables(buildParameters, actionFolder);
|
||||
@@ -7087,10 +7087,9 @@ class SetupMac {
|
||||
...moduleArguments,
|
||||
'--childModules',
|
||||
];
|
||||
const escapedExecPath = this.unityHubExecPath.replace(/ /g, '\\ ');
|
||||
// Ignoring return code because the log seems to overflow the internal buffer which triggers
|
||||
// a false error
|
||||
const errorCode = await exec_1.exec(escapedExecPath, execArguments, { silent, ignoreReturnCode: true });
|
||||
const errorCode = await exec_1.exec(this.unityHubExecPath, execArguments, { silent, ignoreReturnCode: true });
|
||||
if (errorCode) {
|
||||
throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);
|
||||
}
|
||||
@@ -7126,8 +7125,8 @@ class SetupMac {
|
||||
process.env.CHOWN_FILES_TO = buildParameters.chownFilesTo;
|
||||
}
|
||||
}
|
||||
SetupMac.unityHubBasePath = `/Applications/Unity Hub.app`;
|
||||
SetupMac.unityHubExecPath = `${SetupMac.unityHubBasePath}/Contents/MacOS/Unity Hub`;
|
||||
SetupMac.unityHubBasePath = `/Applications/"Unity Hub.app"`;
|
||||
SetupMac.unityHubExecPath = `${SetupMac.unityHubBasePath}/Contents/MacOS/"Unity Hub"`;
|
||||
exports["default"] = SetupMac;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user