forked from RamblingCookieMonster/BuildHelpers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
303eebe
commit 6bb9228
Showing
5 changed files
with
86 additions
and
70 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,14 +82,19 @@ function Get-BuildEnvironment { | |
[validateset('object', 'hashtable')] | ||
[string]$As = 'object' | ||
) | ||
$GBVParams = @{Path = $Path} | ||
|
||
[System.Collections.ArrayList]$GBVParams | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
FISHMANPET
|
||
if($PSboundParameters.ContainsKey('Path')) { | ||
$GBVParams.Path = ( Resolve-Path $Path ).Path | ||
} | ||
${Build.ProjectName} = Get-ProjectName @GBVParams | ||
${Build.ManifestPath} = Get-PSModuleManifest @GBVParams | ||
if($PSBoundParameters.ContainsKey('GitPath')) | ||
{ | ||
$GBVParams.add('GitPath', $GitPath) | ||
$GBVParams.GitPath = $GitPath | ||
} | ||
${Build.Vars} = Get-BuildVariable @GBVParams | ||
${Build.ProjectName} = Get-ProjectName -Path $Path | ||
${Build.ManifestPath} = Get-PSModuleManifest -Path $Path | ||
|
||
if( ${Build.ManifestPath} ) { | ||
${Build.ModulePath} = Split-Path -Path ${Build.ManifestPath} -Parent | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
I'm fairly sure this won't work, you're creating an arraylist then treating it like a hash table. Additionally GBVParams should contain PATH even if it's not specified. Invoke-Git will assume the PWD if it doesn't get a PATH passed to it and since if no path is specified to this cmdlet, the PWD will be assumed the behavior is probably the same, but it probably makes more sense to stay consistent and be explicit and always pass the path in.