@dcdavidev/bastion-cli 0.5.0 → 0.5.1

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.
Binary file
Binary file
package/bin/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  import { spawn } from 'node:child_process';
4
4
  import os from 'node:os';
5
5
  import path from 'node:path';
6
+ import fs from 'node:fs';
6
7
  import { fileURLToPath } from 'node:url';
7
8
 
8
9
  const __filename = fileURLToPath(import.meta.url);
@@ -33,6 +34,25 @@ if (!platforms[platform] || !platforms[platform][arch]) {
33
34
  }
34
35
 
35
36
  const binaryPath = path.join(__dirname, platforms[platform][arch]);
37
+
38
+ if (!fs.existsSync(binaryPath)) {
39
+ console.error(`Error: Bastion CLI binary not found at ${binaryPath}`);
40
+ console.error('Please try reinstalling the package: npm install -g @dcdavidev/bastion-cli');
41
+ process.exit(1);
42
+ }
43
+
44
+ // Ensure the binary is executable on non-Windows platforms
45
+ if (platform !== 'win32') {
46
+ try {
47
+ const stats = fs.statSync(binaryPath);
48
+ if (!(stats.mode & fs.constants.S_IXUSR)) {
49
+ fs.chmodSync(binaryPath, 0o755);
50
+ }
51
+ } catch (err) {
52
+ // If we can't chmod, we'll try spawning anyway
53
+ }
54
+ }
55
+
36
56
  const args = process.argv.slice(2);
37
57
 
38
58
  const child = spawn(binaryPath, args, { stdio: 'inherit' });
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcdavidev/bastion-cli",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Bastion CLI - Secure secret management and execution",
5
5
  "keywords": [
6
6
  "secrets",