tomas / wmic

Wrapper around the Windows WMIC interface for Node.js.
12 stars 15 forks source link

Parse multiple lines #2

Closed Arcath closed 8 years ago

Arcath commented 9 years ago

This fixes the issue in #1 where get_values() returns a single reply instead of all of them.

wmic.get_values('logicaldisk', 'name, volumename', null, function(err, values) {
  console.log(err || values);
});

now returns

 [ { Name: 'C:', VolumeName: 'Windows' },
   { Name: 'L:' },
   { Name: 'R:' },
   { Name: 'S:' },
   { Name: 'T:' },
   { Name: 'U:' },
   { Name: 'V:' },
   { Name: 'W:' } ] }
tomas commented 9 years ago

Very nice, sir. Would you mind adding a (simple) test case so we don't break this in the future? I usually test with the mocha/should combination, using sinon for spies and stubs.

Arcath commented 9 years ago

Will look at adding a test shortly

Arcath commented 9 years ago

That should be all sorted, its working very well off this fork in my current project.

tomas commented 9 years ago

Very nice sir. I'll take a look when I have a minute!

tomas commented 8 years ago

After a very long time this has finally landed on 882a661f225377b1d8f221c08604a2deb2138243.

Thanks again!