balena-io-modules / drivelist

List all connected drives in your computer, in all major operating systems
Apache License 2.0
242 stars 90 forks source link

Fix macos crash #330

Closed zrzka closed 5 years ago

zrzka commented 5 years ago

It fixes #329. I modified the test file a bit (attached at the end of this message). This PR:

index.ts I was using for tests:

import { inspect } from 'util';
import { list } from '..';

async function main() {
  var last_count = -1;
  while (true) {
    let drives;
    try {
      drives = await list();
    } catch (error) {
      console.error(error);
      process.exitCode = 1;
      return;
    }

    if (last_count != drives.length) {
      last_count = drives.length;
      console.log(last_count);
    }
  }
}

main();
zrzka commented 5 years ago

Yep, it just contains Change-type for the changelog.

zrzka commented 5 years ago

@resin-ci retest