Files
rspade_system/node_modules/laravel-mix/src/PackageManager.js
root f6fac6c4bc Fix bin/publish: copy docs.dist from project root
Fix bin/publish: use correct .env path for rspade_system
Fix bin/publish script: prevent grep exit code 1 from terminating script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 02:08:33 +00:00

27 lines
554 B
JavaScript
Executable File

const File = require('./File');
const Paths = require('./Paths');
class PackageManager {
static detect() {
const execPath = process.env.npm_execpath || '';
if (
execPath.endsWith('yarn.js') ||
execPath.endsWith('yarn') ||
PackageManager.hasYarnLockFile()
) {
return 'yarn';
}
return 'npm';
}
static hasYarnLockFile() {
const paths = new Paths();
return File.exists(paths.root('yarn.lock'));
}
}
module.exports = PackageManager;