Skip to content

Commit

Permalink
Merge pull request #5 from ethanbergstrom/conciseErrors
Browse files Browse the repository at this point in the history
More concise errors
  • Loading branch information
ethanbergstrom authored Jan 22, 2022
2 parents b0783f6 + 1d46031 commit e01f3b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ 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.11] - 2022-01-22
### Changed
- Error output is more targeted to only what failed

## [0.0.10] - 2021-12-26
### Fixed
- Correctly source display language information
Expand Down
3 changes: 2 additions & 1 deletion src/Cobalt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ $Commands = @(
param ($output)
if ($output) {
if ($output -match 'failed') {
Write-Error ($output -join "`r`n")
# Only show output that matches or comes after the 'failed' keyword
Write-Error ($output[$output.IndexOf($($output -match 'failed' | Select-Object -First 1))..($output.Length-1)] -join "`r`n")
} else {
$output | ForEach-Object {
if ($_ -match '\[(?<id>[\S]+)\] Version (?<version>[\S]+)' -and $Matches.id -and $Matches.version) {
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.10'
ModuleVersion = '0.0.11'
GUID = '9f295092-e7fd-4c52-b41e-3c5b0612fa52'
Author = 'Ethan Bergstrom'
Copyright = '2021'
Expand Down

0 comments on commit e01f3b7

Please sign in to comment.