@dxos/cli 0.10.0 → 0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a

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/bin/dx.js +11 -1
  2. package/package.json +6 -6
package/bin/dx.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { execFileSync } = require('child_process');
4
+ const { chmodSync } = require('fs');
4
5
  const { join } = require('path');
5
6
 
6
7
  const PLATFORMS = {
@@ -23,7 +24,16 @@ if (!pkg) {
23
24
  try {
24
25
  const binary = process.platform === 'win32' ? 'dx.exe' : 'dx';
25
26
  const binPath = join(require.resolve(pkg), '..', binary);
26
- execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
27
+ try {
28
+ execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
29
+ } catch (error) {
30
+ // Recover from a packer that normalized the binary's mode (pnpm pack drops the executable bit).
31
+ if (error.code !== 'EACCES') {
32
+ throw error;
33
+ }
34
+ chmodSync(binPath, 0o755);
35
+ execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
36
+ }
27
37
  } catch (error) {
28
38
  if (error.code === 'MODULE_NOT_FOUND') {
29
39
  console.error(`Platform-specific package not found: ${pkg}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/cli",
3
- "version": "0.10.0",
3
+ "version": "0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a",
4
4
  "description": "DXOS CLI",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -19,11 +19,11 @@
19
19
  "LICENSE"
20
20
  ],
21
21
  "optionalDependencies": {
22
- "@dxos/cli-darwin-arm64": "0.10.0",
23
- "@dxos/cli-darwin-x64": "0.10.0",
24
- "@dxos/cli-linux-arm64": "0.10.0",
25
- "@dxos/cli-linux-x64": "0.10.0",
26
- "@dxos/cli-win32-x64": "0.10.0"
22
+ "@dxos/cli-darwin-arm64": "0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a",
23
+ "@dxos/cli-darwin-x64": "0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a",
24
+ "@dxos/cli-linux-arm64": "0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a",
25
+ "@dxos/cli-linux-x64": "0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a",
26
+ "@dxos/cli-win32-x64": "0.12.0-next-2be9f24c465d98f4bd186aa03ece788902e6c17a"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"