Closed
Conversation
Example: `> .\bin\checkver.ps1 -App ..\somewhere\bucket\test.json -Force`
87d42da to
58e3cda
Compare
Member
Author
Contributor
|
Looks good by fast static review. I do not know when i will find time to do proper review. I guess Friday / weekend evenings should be good. |
niheaven
requested changes
May 30, 2019
Member
niheaven
left a comment
There was a problem hiding this comment.
Full diff:
diff --git a/bin/checkver.ps1 b/bin/checkver.ps1
index 5d21aff8c..b76f38b70 100644
--- a/bin/checkver.ps1
+++ b/bin/checkver.ps1
@@ -48,7 +48,6 @@
#>
param(
[String] $App = '*',
- [Parameter(Mandatory = $true)]
[ValidateScript( {
if (!(Test-Path $_ -Type Container)) {
throw "$_ is not a directory!"
@@ -56,7 +55,7 @@ param(
$true
}
})]
- [String] $Dir,
+ [String] $Dir = '.',
[Switch] $Update,
[Switch] $ForceUpdate,
[Switch] $SkipUpdated,
@@ -75,10 +74,9 @@ param(
# get apps to check
$Queue = @()
if((Test-Path $App) -and $App -ne "*") {
- $Queue = @(Get-ChildItem $App)
+ $Queue = @(Get-Item -Path (Convert-Path -Path $App))
} else {
- $Dir = Resolve-Path $Dir
- $Queue = @(Get-ChildItem -Path $Dir -Filter "$App.json")
+ $Queue = @(Get-ChildItem -Path (Convert-Path -Path $Dir) -Filter "$App.json")
}
# clear any existing events
@@ -211,7 +209,7 @@ while ($in_progress -gt 0) {
}
if (!$regex -and $replace) {
- next "'replace' requires 're' or 'regex'"
+ next $app "'replace' requires 're' or 'regex'"
continue
}
| $Queue += , @($_.Name, $json) | ||
| } | ||
| if((Test-Path $App) -and $App -ne "*") { | ||
| $Queue = @(Get-ChildItem $App) |
Member
There was a problem hiding this comment.
Suggested change
| $Queue = @(Get-ChildItem $App) | |
| $Queue = @(Get-Item -Path (Convert-Path -Path $App)) |
| $Queue = @(Get-ChildItem $App) | ||
| } else { | ||
| $Dir = Resolve-Path $Dir | ||
| $Queue = @(Get-ChildItem -Path $Dir -Filter "$App.json") |
Member
There was a problem hiding this comment.
Suggested change
| $Queue = @(Get-ChildItem -Path $Dir -Filter "$App.json") | |
| $Queue = @(Get-ChildItem -Path (Convert-Path -Path $Dir) -Filter "$App.json") |
Also remove above $Dir = Resolve-Path $Dir
5 tasks
Member
|
Superceded by #5019 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
checkver.ps1> .\bin\checkver.ps1 -App ..\somewhere\bucket\test.json -Forcenext()