Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: detect package manager in wrong directory #8685

Merged
merged 1 commit into from
Jul 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: detect package manager in wrong directory
  • Loading branch information
AdoKevin committed Jul 7, 2021
commit cb51ab7668125308689b3cf46decf5eb81a45c08
6 changes: 3 additions & 3 deletions tests/beforeTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const findChrome = require('carlo/lib/find_chrome');
const detectInstaller = require('detect-installer');

const installPuppeteer = () => {
// find can use package manger
const packages = detectInstaller(join(__dirname, '../../'));
// get installed package manger
// find can use package manager
const packages = detectInstaller(join(__dirname, '../'));
// get installed package manager
const packageName = packages.find(detectInstaller.hasPackageCommand) || 'npm';
console.log(`🤖 will use ${packageName} install puppeteer`);
const command = `${packageName} ${packageName.includes('yarn') ? 'add' : 'i'} puppeteer`;
Expand Down