diff options
Diffstat (limited to 'cli/npm')
-rw-r--r-- | cli/npm/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/npm/mod.rs b/cli/npm/mod.rs index f48f7a740..3971b1a0b 100644 --- a/cli/npm/mod.rs +++ b/cli/npm/mod.rs @@ -189,3 +189,15 @@ impl NpmFetchResolver { info } } + +pub const NPM_CONFIG_USER_AGENT_ENV_VAR: &str = "npm_config_user_agent"; + +pub fn get_npm_config_user_agent() -> String { + format!( + "deno/{} npm/? deno/{} {} {}", + env!("CARGO_PKG_VERSION"), + env!("CARGO_PKG_VERSION"), + std::env::consts::OS, + std::env::consts::ARCH + ) +} |