Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running PSDepend multiple times results in subfolders created instead #86

Open
ChrisMagnuson opened this issue Jun 12, 2018 · 1 comment
Labels

Comments

@ChrisMagnuson
Copy link

ChrisMagnuson commented Jun 12, 2018

PSVersion 5.1.17134.48

Running @{"Tervis-Tumbler/PowerShellApplication"=@{version="master";target="."}}|Invoke-PSDepend -Install -Force once will create a folder in the current directory named PowerShellApplication that contains the contents of the cloned repository:

PS C:\test> @{"Tervis-Tumbler/PowerShellApplication"=@{version="master";target="."}}|Invoke-PSDepend -Install -Force
PS C:\test> gci


    Directory: C:\test


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        6/12/2018  10:38 AM                PowerShellApplication


PS C:\test> gci .\PowerShellApplication


    Directory: C:\test\PowerShellApplication


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----         6/5/2018   1:56 PM            378 .gitattributes
-a----         6/5/2018   1:56 PM            649 .gitignore
-a----         6/5/2018   1:56 PM          11357 license
-a----         6/5/2018   1:56 PM           6887 PowerShellApplication.psm1

Running it a second time results in subdirectory named PowerShellApplication underneath the previous PowerShellApplication directory:

PS C:\test> @{"Tervis-Tumbler/PowerShellApplication"=@{version="master";target="."}}|Invoke-PSDepend -Install -Force
PS C:\test> gci .\PowerShellApplication


    Directory: C:\test\PowerShellApplication


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        6/12/2018  10:41 AM                PowerShellApplication
-a----         6/5/2018   1:56 PM            378 .gitattributes
-a----         6/5/2018   1:56 PM            649 .gitignore
-a----         6/5/2018   1:56 PM          11357 license
-a----         6/5/2018   1:56 PM           6887 PowerShellApplication.psm1


PS C:\test> gci .\PowerShellApplication\PowerShellApplication


    Directory: C:\test\PowerShellApplication\PowerShellApplication


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----         6/5/2018   1:56 PM            378 .gitattributes
-a----         6/5/2018   1:56 PM            649 .gitignore
-a----         6/5/2018   1:56 PM          11357 license
-a----         6/5/2018   1:56 PM           6887 PowerShellApplication.psm1

Running it a third time doesn't create any new folders.

I believe the expected behavior would be to overwrite the original PowerShellApplication directory on each run of Invoke-PSDepend.

@RamblingCookieMonster
Copy link
Owner

Eek! Tied up this weekend, but will try to take a look when I have some free time - definitely not the intended behavior : ) Might be some copy-item silliness.

Thanks for finding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants