uniner-cli 1.0.2 → 1.0.5

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.
package/bin/uniner-cli.js CHANGED
@@ -1,42 +1,42 @@
1
- #!/usr/bin/env node
2
- // Tiny launcher: forward every CLI invocation to the real PyInstaller exe.
3
- //
4
- // `npm install -g uniner-cli` registers this file as the global `uniner-cli`
5
- // command (because of the `bin` entry in package.json). We just spawn the real
6
- // binary with the same argv/stdio and exit with its status code.
7
-
8
- 'use strict';
9
-
10
- const { spawnSync } = require('child_process');
11
- const fs = require('fs');
12
- const { realBinaryPath, isInstalled, pkg } = require('../lib/paths');
13
-
14
- const exe = realBinaryPath();
15
-
16
- if (!isInstalled()) {
17
- console.error('');
18
- console.error(`[uniner-cli] Real binary not found at: ${exe}`);
19
- console.error('[uniner-cli] The npm postinstall step must not have completed.');
20
- console.error('[uniner-cli] Try one of:');
21
- console.error('[uniner-cli] npm rebuild -g uniner-cli');
22
- console.error('[uniner-cli] npm uninstall -g uniner-cli && npm install -g uniner-cli');
23
- console.error('');
24
- process.exit(127);
25
- }
26
-
27
- // stdio:'inherit' forwards stdin/stdout/stderr unchanged so interactive prompts
28
- // and ANSI color survive. shell:false avoids any path-quoting surprises.
29
- const result = spawnSync(exe, process.argv.slice(2), {
30
- stdio: 'inherit',
31
- shell: false,
32
- windowsHide: false,
33
- });
34
-
35
- if (result.error) {
36
- console.error(`[uniner-cli] Failed to launch ${exe}: ${result.error.message}`);
37
- process.exit(1);
38
- }
39
-
40
- // `status` is null when the child was killed by a signal; in that case let
41
- // the user see we did not exit cleanly.
42
- process.exit(result.status === null ? 1 : result.status);
1
+ #!/usr/bin/env node
2
+ // Tiny launcher: forward every CLI invocation to the real PyInstaller exe.
3
+ //
4
+ // `npm install -g uniner-cli` registers this file as the global `uniner-cli`
5
+ // command (because of the `bin` entry in package.json). We just spawn the real
6
+ // binary with the same argv/stdio and exit with its status code.
7
+
8
+ 'use strict';
9
+
10
+ const { spawnSync } = require('child_process');
11
+ const fs = require('fs');
12
+ const { realBinaryPath, isInstalled, pkg } = require('../lib/paths');
13
+
14
+ const exe = realBinaryPath();
15
+
16
+ if (!isInstalled()) {
17
+ console.error('');
18
+ console.error(`[uniner-cli] Real binary not found at: ${exe}`);
19
+ console.error('[uniner-cli] The npm postinstall step must not have completed.');
20
+ console.error('[uniner-cli] Try one of:');
21
+ console.error('[uniner-cli] npm rebuild -g uniner-cli');
22
+ console.error('[uniner-cli] npm uninstall -g uniner-cli && npm install -g uniner-cli');
23
+ console.error('');
24
+ process.exit(127);
25
+ }
26
+
27
+ // stdio:'inherit' forwards stdin/stdout/stderr unchanged so interactive prompts
28
+ // and ANSI color survive. shell:false avoids any path-quoting surprises.
29
+ const result = spawnSync(exe, process.argv.slice(2), {
30
+ stdio: 'inherit',
31
+ shell: false,
32
+ windowsHide: false,
33
+ });
34
+
35
+ if (result.error) {
36
+ console.error(`[uniner-cli] Failed to launch ${exe}: ${result.error.message}`);
37
+ process.exit(1);
38
+ }
39
+
40
+ // `status` is null when the child was killed by a signal; in that case let
41
+ // the user see we did not exit cleanly.
42
+ process.exit(result.status === null ? 1 : result.status);