Skip to content

Commit

Permalink
Correctly order output package attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom committed Dec 4, 2021
1 parent 80ebb71 commit 6f8832d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.2] - 2021-12-02
## [0.0.3] - 2021-12-04
### Fixed
Correctly order output package attributes

## [0.0.2] - 2021-12-04
### Fixed
Correctly handle output when no results are found with `list` or `search` commands

Expand Down
4 changes: 2 additions & 2 deletions src/Cobalt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ $Commands = @(
)

$output | Select-Object -Skip ($headerLine+2) | ForEach-Object {
$package = @{
$package = [ordered]@{
ID = $_.SubString($idIndex,$versionIndex-$idIndex).Trim()
Version = $_.SubString($versionIndex,$versionEndIndex-$versionIndex).Trim()
}
Expand Down Expand Up @@ -233,7 +233,7 @@ $Commands = @(
$sourceIndex = $output[$headerLine].IndexOf('Source')

$output | Select-Object -Skip ($headerLine+2) | ForEach-Object {
[pscustomobject]@{
[pscustomobject][ordered]@{
ID = $_.SubString($idIndex,$versionIndex-$idIndex).Trim()
Version = $_.SubString($versionIndex,$sourceIndex-$VersionIndex).Trim()
Source = $_.SubString($sourceIndex).Trim()
Expand Down
2 changes: 1 addition & 1 deletion src/Cobalt.psd1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
RootModule = 'Cobalt.psm1'
ModuleVersion = '0.0.2'
ModuleVersion = '0.0.3'
GUID = '9f295092-e7fd-4c52-b41e-3c5b0612fa52'
Author = 'Ethan Bergstrom'
Copyright = '2021'
Expand Down

0 comments on commit 6f8832d

Please sign in to comment.