summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2022-10-21 07:18:30 -0500
committerChad Elliott <elliottc@objectcomputing.com>2022-10-21 07:18:30 -0500
commit6f8a50e330194e93f43eb0352e8c1c4b18afe598 (patch)
treee88005754cd6764f1601368153b35491ce0690a0 /modules
parent2d743f8f88dfa882922d9a16aa59486a2d1fc098 (diff)
downloadMPC-6f8a50e330194e93f43eb0352e8c1c4b18afe598.tar.gz
Sort combined commands (based on original type) so that projects are reproducable.
Diffstat (limited to 'modules')
-rw-r--r--modules/ProjectCreator.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index e51cf6ca..de7ff8f5 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -4704,6 +4704,12 @@ sub get_custom_value {
}
}
}
+
+ ## Sort the list of commands based on the original type so that generated
+ ## projects are reproducable.
+ my $det = $self->{'custom_multi_details'};
+ my @sorted = sort { $det->{$a}->{'type'} cmp $det->{$b}->{'type'} } @$value;
+ $value = \@sorted;
}
elsif (exists $self->{'custom_multi_details'}->{$based}->{$cmd}) {
# only used with 'combined_custom'