mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 11:40:24 +08:00
10 lines
309 B
JavaScript
10 lines
309 B
JavaScript
'use strict';
|
|
|
|
const userAgent = process.env.npm_config_user_agent;
|
|
const isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));
|
|
const isNpm = Boolean(userAgent && userAgent.startsWith('npm'));
|
|
|
|
module.exports.isNpmOrYarn = isNpm || isYarn;
|
|
module.exports.isNpm = isNpm;
|
|
module.exports.isYarn = isYarn;
|