-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(lib): Use lsblk directly, parse json output #254
Conversation
This changes to shelling out to `diskutil` directly, instead of using an intermediate script, and uses the `-plist` option to obtain and parse the machine-readable output. Change-Type: minor
This switches from using a bash script on linux to shelling out to `lsblk` directly, using its `--json` option to obtain & parse machine-readable output – removing the need for external script files entirely. Change-Type: minor
362d0ef
to
d79619f
Compare
I guess the stuff in the README about external scripts & yaml needs to be updated then? 😉 |
Huh? This was unexpected... |
Yeah, that is weird, I was in the middle of reviewing too... |
I'll rebase and open a new PR; needs some more work from what it looks like anyways, as it blew on the Linux boxes on Travis – maybe |
.map((c) => { | ||
return c.label; | ||
}); | ||
subLabels = Array.from(new Set(subLabels)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to remove duplicates right? Maybe we can add a comment?
error.stderr = stderr; | ||
} else { | ||
try { | ||
// data = JSON.parse(stdout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this?
Here are my comments anyway :) |
...which means it probably won't work on the Ubuntu 12.04 that I think Etcher still supports? :-/ |
This switches from using a bash script on linux to shelling out
to
lsblk
directly, using its--json
option to obtain & parsemachine-readable output – removing the need for external script
files entirely.
NOTE: This branch is based on
diskutil-plist
, which has hence has been selected as merge-base. This will automatically resolve tomaster
once #253 is merged.Change-Type: minor
Depends on: #253
Connects To: #231, #165