Skip to content

Commit

Permalink
chore: address review
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Apr 9, 2021
1 parent 32e6c76 commit 6a051e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin-sign.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: "12.18.3"
versionSpec: "14.x"

- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
Expand Down
5 changes: 3 additions & 2 deletions src/vs/base/node/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ export const virtualMachineHint: { value(): number } = new class {

const interfaces = networkInterfaces();
for (let name in interfaces) {
if (Object.prototype.hasOwnProperty.call(interfaces, name)) {
for (const { mac, internal } of interfaces[name]!) {
const networkInterface = interfaces[name];
if (networkInterface) {
for (const { mac, internal } of networkInterface) {
if (!internal) {
interfaceCount += 1;
if (this._isVirtualMachineMacAdress(mac.toUpperCase())) {
Expand Down
11 changes: 7 additions & 4 deletions src/vs/base/node/macAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ function doGetMac(): Promise<string> {
return new Promise((resolve, reject) => {
try {
const ifaces = networkInterfaces();
for (const [, infos] of Object.entries(ifaces)) {
for (const info of infos!) {
if (validateMacAddress(info.mac)) {
return resolve(info.mac);
for (let name in ifaces) {
const networkInterface = ifaces[name];
if (networkInterface) {
for (const { mac } of networkInterface) {
if (validateMacAddress(mac)) {
return resolve(mac);
}
}
}
}
Expand Down

0 comments on commit 6a051e9

Please sign in to comment.