Skip to content

Commit

Permalink
fix(scoop-config): Output [DateTime] as [String] (#5232)
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven authored Oct 31, 2022
1 parent 29e5898 commit d7bfe52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- **decompress:** Trim ending '/' ([#5195](https://github.com/ScoopInstaller/Scoop/issues/5195))
- **shim:** Exit if shim creating failed 'cause no git ([#5225](https://github.com/ScoopInstaller/Scoop/issues/5225))
- **scoop-import:** Add correct architecture argument ([#5210](https://github.com/ScoopInstaller/Scoop/issues/5210))
- **scoop-config:** Output `[DateTime]` as `[String]` ([#5232](https://github.com/ScoopInstaller/Scoop/issues/5232))

### Code Refactoring

Expand Down
6 changes: 5 additions & 1 deletion libexec/scoop-config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ if (!$name) {
if($null -eq $value) {
Write-Host "'$name' is not set"
} else {
$value
if ($value -is [System.DateTime]) {
$value.ToString('o')
} else {
$value
}
}
}

Expand Down

0 comments on commit d7bfe52

Please sign in to comment.