icoa-cli 2.1.1 → 2.1.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.
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ ${LINE}
36
36
  ${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
37
37
  ${chalk.cyan.underline('https://icoa2026.au')}
38
38
 
39
- ${chalk.gray('CLI-Native Competition Terminal v2.1.1')}
39
+ ${chalk.gray('CLI-Native Competition Terminal v2.1.2')}
40
40
 
41
41
  ${LINE}
42
42
  `;
package/dist/repl.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createInterface } from 'node:readline';
2
- import { spawn } from 'node:child_process';
2
+ import { spawn, execSync as execSyncFn } from 'node:child_process';
3
3
  import chalk from 'chalk';
4
4
  import { isConnected, getConfig } from './lib/config.js';
5
5
  import { isActivated, activateToken, isFreeCommand, isDeviceMatch, recordExit, recordResume, isFirstRunOrUpgrade, markVersionSeen } from './lib/access.js';
@@ -27,7 +27,7 @@ const BLOCKED_COMMANDS = new Set([
27
27
  'iptables', 'ufw', // firewall
28
28
  ]);
29
29
  const INTERCEPT = '__REPL_NO_EXIT__';
30
- const VERSION = '2.1.1';
30
+ const VERSION = '2.1.2';
31
31
  export async function startRepl(program, resumeMode) {
32
32
  const config = getConfig();
33
33
  const connected = isConnected();
@@ -221,7 +221,7 @@ export async function startRepl(program, resumeMode) {
221
221
  rl.prompt();
222
222
  return;
223
223
  }
224
- // Force Python 3.12 — rewrite python3/python to 3.12 binaries
224
+ // Force Python 3.12 — rewrite python/python3 to correct binary
225
225
  let resolvedInput = input;
226
226
  if (process.platform === 'darwin') {
227
227
  const py12 = '/opt/homebrew/opt/python@3.12/bin/python3.12';
@@ -229,6 +229,19 @@ export async function startRepl(program, resumeMode) {
229
229
  .replace(/^python3?\s/, `${py12} `)
230
230
  .replace(/^(python3|python)$/, py12);
231
231
  }
232
+ else {
233
+ // Linux/WSL: python → python3 (or python3.12 if available)
234
+ const py12 = (() => { try {
235
+ execSyncFn('which python3.12', { stdio: 'ignore' });
236
+ return 'python3.12';
237
+ }
238
+ catch {
239
+ return 'python3';
240
+ } })();
241
+ resolvedInput = resolvedInput
242
+ .replace(/^python\s/, `${py12} `)
243
+ .replace(/^python$/, py12);
244
+ }
232
245
  // Ensure workspace directory
233
246
  const cwd = ensureWorkspace();
234
247
  // Route to Docker sandbox if available, otherwise system shell (in workspace)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {