gitarsenal-cli 1.0.0 → 1.0.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.
@@ -22,10 +22,21 @@ async function postinstall() {
22
22
  // Create the Python directory if it doesn't exist
23
23
  await fs.ensureDir(pythonScriptDir);
24
24
 
25
- // Check if the original script exists
25
+ // Check if the Python script already exists and has content
26
26
  let scriptFound = false;
27
+ if (await fs.pathExists(pythonScriptPath)) {
28
+ const stats = await fs.stat(pythonScriptPath);
29
+ // If the file is larger than 5KB, assume it's the full script
30
+ if (stats.size > 5000) {
31
+ console.log(chalk.green('✅ Found existing full Python script. Keeping it.'));
32
+ scriptFound = true;
33
+ } else {
34
+ console.log(chalk.yellow('⚠️ Existing Python script appears to be minimal. Looking for full version...'));
35
+ }
36
+ }
27
37
 
28
- if (await fs.pathExists(originalScriptPath)) {
38
+ // Check if the original script exists
39
+ if (!scriptFound && await fs.pathExists(originalScriptPath)) {
29
40
  console.log(chalk.green('✅ Found original Python script in mcp-server'));
30
41
  await fs.copy(originalScriptPath, pythonScriptPath);
31
42
  scriptFound = true;