algomath-extract 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/bin/install.js +4 -11
  2. package/package.json +1 -1
package/bin/install.js CHANGED
@@ -365,19 +365,12 @@ const files = fs.readdirSync(sourceDir).filter(f => f.endsWith('.md'));
365
365
  for (const file of files) {
366
366
  const source = path.join(sourceDir, file);
367
367
  const dest = path.join(commandDir, file);
368
- // For local installs that needed sudo, try regular copy first, then sudo if needed
369
- if (needsElevated && location === 'local' && !isWindows) {
370
- try {
371
- fs.copyFileSync(source, dest);
372
- } catch (e) {
373
- // If regular copy fails, use sudo
368
+
369
+ // For any install that needs elevated permissions, use sudo
370
+ if (needsElevated && !isWindows) {
371
+ // Use sudo to copy, then fix ownership
374
372
  execSync(`sudo cp "${source}" "${dest}"`, { stdio: 'pipe' });
375
- // Fix ownership after sudo copy
376
373
  execSync(`sudo chown $(whoami) "${dest}"`, { stdio: 'pipe' });
377
- }
378
- } else if (needsElevated && !isWindows) {
379
- // Global install with sudo
380
- execSync(`sudo cp "${source}" "${dest}"`, { stdio: 'pipe' });
381
374
  } else {
382
375
  fs.copyFileSync(source, dest);
383
376
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "algomath-extract",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "AlgoMath Framework - Transform AI assistants into reliable mathematical problem-solving environments",
5
5
  "main": "index.js",
6
6
  "bin": {