Skip to content

Commit e010489

Browse files
unity-cli@v1.6.4 (#51)
- fix services config file permissions for posix
1 parent 1d05eb8 commit e010489

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rage-against-the-pixel/unity-cli",
3-
"version": "1.6.3",
3+
"version": "1.6.4",
44
"description": "A command line utility for the Unity Game Engine.",
55
"author": "RageAgainstThePixel",
66
"license": "MIT",

src/license-client.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ export class LicensingClient {
111111
fs.mkdirSync(servicesConfigDirectory, { recursive: true });
112112
}
113113

114+
if (process.platform !== 'win32') {
115+
fs.chmodSync(servicesConfigDirectory, 0o755);
116+
}
117+
118+
fs.accessSync(servicesConfigDirectory, fs.constants.R_OK | fs.constants.W_OK);
114119
return path.join(servicesConfigDirectory, 'services-config.json');
115120
}
116121

@@ -418,6 +423,11 @@ export class LicensingClient {
418423
fs.writeFileSync(servicesConfigPath, Buffer.from(options.servicesConfig, 'base64'));
419424
}
420425

426+
if (process.platform !== 'win32') {
427+
fs.chmodSync(servicesConfigPath, 0o644);
428+
}
429+
430+
fs.accessSync(servicesConfigPath, fs.constants.R_OK);
421431
this.logger.debug(`Using services config at: ${servicesConfigPath}`);
422432

423433
const output = await this.exec([`--acquire-floating`], true);

0 commit comments

Comments
 (0)