Skip to content

Running PSDepend multiple times results in subfolders created instead  #86

@ChrisMagnuson

Description

@ChrisMagnuson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstatus: staleNo activity, candidate for closing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions