sandboxbox 2.0.3 → 2.0.4
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/cli.js +24 -3
- package/package.json +1 -1
package/cli.js
CHANGED
@@ -96,9 +96,30 @@ function checkPodman() {
|
|
96
96
|
console.log(color('green', `✅ ${version}${isBundled ? ' (bundled)' : ''}`));
|
97
97
|
return podmanPath;
|
98
98
|
} catch (error) {
|
99
|
-
|
100
|
-
|
101
|
-
|
99
|
+
// If no bundled Podman and system Podman not found, try to download
|
100
|
+
if (!isBundled && !existsSync(podmanPath)) {
|
101
|
+
console.log(color('red', '❌ Podman not found'));
|
102
|
+
console.log(color('yellow', '\n📦 Auto-downloading Podman...'));
|
103
|
+
|
104
|
+
try {
|
105
|
+
// Run the download script directly
|
106
|
+
const scriptPath = resolve(__dirname, 'scripts', 'download-podman.js');
|
107
|
+
execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname });
|
108
|
+
|
109
|
+
// Try again with downloaded Podman
|
110
|
+
const newPodmanPath = getPodmanPath();
|
111
|
+
const version = execSync(`"${newPodmanPath}" --version`, { encoding: 'utf-8', stdio: 'pipe' }).trim();
|
112
|
+
console.log(color('green', `\n✅ ${version} (auto-downloaded)`));
|
113
|
+
return newPodmanPath;
|
114
|
+
} catch (downloadError) {
|
115
|
+
console.log(color('red', `\n❌ Auto-download failed: ${downloadError.message}`));
|
116
|
+
console.log(color('yellow', '\n💡 Please install Podman manually:'));
|
117
|
+
}
|
118
|
+
} else {
|
119
|
+
console.log(color('red', '❌ Podman not found'));
|
120
|
+
console.log(color('yellow', '\n💡 Please install Podman manually:'));
|
121
|
+
}
|
122
|
+
|
102
123
|
console.log('');
|
103
124
|
if (process.platform === 'win32') {
|
104
125
|
console.log(color('cyan', ' Windows:'));
|
package/package.json
CHANGED