|
|
|
@ -1,11 +1,17 @@ |
|
|
|
[CmdletBinding()] |
|
|
|
param( |
|
|
|
[string] $SourceRoot = 'C:\Users\dkucinski\.scout\m-skills', |
|
|
|
[string] $RepositoryRoot = $PSScriptRoot |
|
|
|
[string] $RepositoryRoot |
|
|
|
) |
|
|
|
|
|
|
|
$ErrorActionPreference = 'Stop' |
|
|
|
|
|
|
|
# $PSScriptRoot is empty when the script is launched as `powershell -File <relative path>` |
|
|
|
# (Windows PowerShell 5.1), which would make the Resolve-Path below fail on an empty string. |
|
|
|
if ([string]::IsNullOrWhiteSpace($RepositoryRoot)) { |
|
|
|
$RepositoryRoot = if ($PSScriptRoot) { $PSScriptRoot } else { Split-Path -Parent $MyInvocation.MyCommand.Path } |
|
|
|
} |
|
|
|
|
|
|
|
$repositoryRoot = (Resolve-Path -LiteralPath $RepositoryRoot).Path |
|
|
|
$sourceRoot = (Resolve-Path -LiteralPath $SourceRoot).Path |
|
|
|
$logDirectory = Join-Path $repositoryRoot 'logs' |
|
|
|
|