sandboxbox 2.4.4 → 2.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "description": "Portable container runner with Podman - Claude Code & Playwright support. Works on Windows, macOS, and Linux.",
5
5
  "type": "module",
6
6
  "main": "cli.js",
@@ -84,6 +84,7 @@ export function runCommand(projectDir, cmd = 'bash') {
84
84
  const maxRetries = process.platform === 'linux' ? 3 : 12; // More retries for Windows/macOS
85
85
 
86
86
  while (retries < maxRetries) {
87
+ console.log(color('cyan', ` Debug: Attempt ${retries + 1}/${maxRetries} - running container command...`));
87
88
  try {
88
89
  execSync(`"${podmanPath}" run --rm -it ${mounts.join(' ')} -w /workspace sandboxbox:latest ${cmd}`, {
89
90
  stdio: 'inherit',
@@ -97,6 +98,10 @@ export function runCommand(projectDir, cmd = 'bash') {
97
98
  return true;
98
99
  } catch (error) {
99
100
  retries++;
101
+ // Debug: Log the actual error message
102
+ console.log(color('cyan', ` Debug: Error message: "${error.message}"`));
103
+ console.log(color('cyan', ` Debug: Checking retry patterns...`));
104
+
100
105
  if (retries < maxRetries && (error.message.includes('Cannot connect to Podman') || error.message.includes('connectex') || error.message.includes('No connection could be made') || error.message.includes('actively refused'))) {
101
106
  console.log(color('yellow', ` Backend not ready yet (${retries}/${maxRetries}), waiting 15 seconds...`));
102
107
  const start = Date.now();
package/utils/podman.js CHANGED
@@ -29,7 +29,7 @@ export function getPodmanPath() {
29
29
  export function setupBackendNonBlocking(podmanPath) {
30
30
  if (process.platform === 'linux') {
31
31
  // Linux can run true rootless Podman
32
- const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true };
32
+ const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true, windowsHide: process.platform === 'win32' };
33
33
  try {
34
34
  execSync(`"${podmanPath}" info`, execOptions);
35
35
  return true;
@@ -48,7 +48,7 @@ export function setupBackendNonBlocking(podmanPath) {
48
48
 
49
49
  // Windows: Implement completely silent automated setup
50
50
  if (process.platform === 'win32') {
51
- const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true };
51
+ const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true, windowsHide: process.platform === 'win32' };
52
52
 
53
53
  try {
54
54
  execSync(`"${podmanPath}" info`, execOptions);
@@ -68,7 +68,7 @@ export function setupBackendNonBlocking(podmanPath) {
68
68
 
69
69
  // macOS: Similar automated approach
70
70
  if (process.platform === 'darwin') {
71
- const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true };
71
+ const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true, windowsHide: process.platform === 'win32' };
72
72
 
73
73
  try {
74
74
  execSync(`"${podmanPath}" info`, execOptions);
@@ -124,7 +124,7 @@ function setupMachineBackground(podmanPath) {
124
124
  export function checkBackend(podmanPath) {
125
125
  if (process.platform === 'linux') return true;
126
126
 
127
- const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true };
127
+ const execOptions = { encoding: 'utf-8', stdio: 'pipe', shell: true, windowsHide: process.platform === 'win32' };
128
128
 
129
129
  try {
130
130
  execSync(`"${podmanPath}" info`, execOptions);
@@ -154,7 +154,7 @@ export function checkPodman() {
154
154
  shell: process.platform === 'win32'
155
155
  };
156
156
 
157
- const version = execSync(`"${podmanPath}" --version`, execOptions).trim();
157
+ const version = execSync(`"${podmanPath}" --version`, { encoding: 'utf-8', stdio: 'pipe', shell: process.platform === 'win32', windowsHide: process.platform === 'win32' }).trim();
158
158
  console.log(color('green', `✅ ${version}${isBundled ? ' (bundled)' : ''}`));
159
159
  return podmanPath;
160
160
  } catch (error) {
@@ -163,7 +163,7 @@ export function checkPodman() {
163
163
 
164
164
  try {
165
165
  const scriptPath = resolve(__dirname, '..', 'scripts', 'download-podman.js');
166
- execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname, shell: process.platform === 'win32' });
166
+ execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname, shell: process.platform === 'win32', windowsHide: process.platform === 'win32' });
167
167
 
168
168
  const newPodmanPath = getPodmanPath();
169
169
  if (!existsSync(newPodmanPath) && newPodmanPath !== 'podman') {
@@ -176,7 +176,7 @@ export function checkPodman() {
176
176
  shell: process.platform === 'win32'
177
177
  };
178
178
 
179
- const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
179
+ const newVersion = execSync(`"${newPodmanPath}" --version`, { encoding: 'utf-8', stdio: 'pipe', shell: process.platform === 'win32', windowsHide: process.platform === 'win32' }).trim();
180
180
  console.log(`\n✅ ${newVersion} (auto-downloaded)`);
181
181
  console.log('✅ Portable Podman ready');
182
182