Skip to content

Commit

Permalink
Sort iotedge list output by module name (#1305)
Browse files Browse the repository at this point in the history
Fixes #1192
  • Loading branch information
arsing authored Jun 7, 2019
1 parent da97168 commit 0ea4943
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion edgelet/iotedge/src/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ where
.list_with_details()
.map_err(|err| Error::from(err.context(ErrorKind::ModuleRuntime)))
.collect()
.and_then(move |result| {
.and_then(move |mut result| {
result.sort_by(|(mod1, _), (mod2, _)| mod1.name().cmp(mod2.name()));

let mut w = write.lock().unwrap();
writeln!(w, "NAME\tSTATUS\tDESCRIPTION\tCONFIG")
.context(ErrorKind::WriteToStdout)?;
Expand Down

0 comments on commit 0ea4943

Please sign in to comment.