Skip to content

Process is terminating due to StackOverflowException with custom provider on PSModulePath #5565

@DarqueWarrior

Description

@DarqueWarrior

Steps to reproduce

$path = '~/code'
pushd $path
Install-module SHiPS 
git clone https://github.com/DarqueWarrior/vsteam.git
$env:PSModulePath += ";$((resolve-path $path).path)"
Import-module vsteam -verbose
Add-TeamAccount -Account <YourVSTSAccountNameOnly> -Drive <DesiredDrive> -Verbose
# Enter your Personal Access Token to VSTS Account

Expected behavior

# Drive will be added
Set-Location <DesiredDrive>:
ls

Actual behavior

Process is terminating due to StackOverflowException.

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-rc
PSEdition                      Core
GitCommitId                    v6.0.0-rc
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Workaround

Do not add module path to PSModulePath and the steps below will work.

$path = '~/code'
pushd $path
Install-module SHiPS 
git clone https://github.com/DarqueWarrior/vsteam.git
Import-module ./vsteam -verbose
Add-TeamAccount -Account <YourVSTSAccountNameOnly> -Drive <DesiredDrive> -Verbose
# Enter your Personal Access Token to VSTS Account
# Drive will be 
Set-Location <DesiredDrive>:
ls

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions