add typings installer user agent for npm requests (#12446) (#12449)

* add typings installer user agent for npm requests

* address PR feedback: change name of user agent
This commit is contained in:
Vladimir Matveev 2016-11-22 15:22:50 -08:00 committed by GitHub
parent fb23e6dba1
commit 432f7a9a7d

View File

@ -127,7 +127,7 @@ namespace ts.server.typingsInstaller {
if (this.log.isEnabled()) {
this.log.writeLine(`#${requestId} with arguments'${JSON.stringify(args)}'.`);
}
const command = `${this.npmPath} install ${args.join(" ")} --save-dev`;
const command = `${this.npmPath} install ${args.join(" ")} --save-dev --user-agent="typesInstaller/${version}"`;
const start = Date.now();
let stdout: Buffer;
let stderr: Buffer;