antigravity-rtl 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +4 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -14,17 +14,6 @@ const { blue, cyan, green, red, yellow, bold } = picocolors;
14
14
 
15
15
  console.log(bold(cyan('\n✨ Antigravity Smart RTL Patcher\n')));
16
16
 
17
- function checkPermissions() {
18
- if (os.platform() !== 'win32') {
19
- if (process.getuid && process.getuid() !== 0) {
20
- console.error(red('✖ Permission Denied!'));
21
- console.error(yellow('Please run this command with sudo:'));
22
- console.error(bold('sudo npx antigravity-rtl\n'));
23
- process.exit(1);
24
- }
25
- }
26
- }
27
-
28
17
  function getDefaultPath() {
29
18
  if (os.platform() === 'darwin') {
30
19
  return '/Applications/Antigravity.app/Contents/Resources/app.asar';
@@ -61,7 +50,6 @@ const args = process.argv.slice(2);
61
50
  const isRestore = args.includes('--restore');
62
51
 
63
52
  async function main() {
64
- checkPermissions();
65
53
  const asarPath = await getAsarPath();
66
54
  const backupPath = asarPath + '.bak';
67
55
 
@@ -90,10 +78,13 @@ async function main() {
90
78
  }
91
79
  } catch (e) {
92
80
  spinner.fail('Permission Denied.');
81
+ console.error(red('\nSystem Error: ' + e.message));
93
82
  if (os.platform() === 'win32') {
94
83
  console.error(yellow('\nPlease run your terminal (PowerShell/CMD) as Administrator and try again.\n'));
95
84
  } else {
96
- console.error(yellow('\nPlease run this command with sudo.\n'));
85
+ console.error(yellow('\nNote: "sudo npx" sometimes drops root privileges. If so, try this alternative:'));
86
+ console.error(bold(' sudo npm install -g antigravity-rtl'));
87
+ console.error(bold(' sudo antigravity-rtl\n'));
97
88
  }
98
89
  process.exit(1);
99
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-rtl",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A smart RTL (Right-to-Left) patcher with UI settings for the Antigravity application.",
5
5
  "main": "index.js",
6
6
  "scripts": {