Skip to content

[InitialSessionState]::CreateFromSessionConfigurationFile should give an invalid operation for a file that does not exist #1150

Closed

Description

Steps to reproduce

[InitialSessionState]::CreateFromSessionConfigurationFile("c:\IDoNotExist.pssc", { $true })

Expected behavior

PSInvalidOperationException

Actual behavior

Exception calling "CreateFromSessionConfigurationFile" with "2" argument(s): "Could not find file
'c:\IDoNotExist.pssc'."
At line:1 char:1
+ [InitialSessionState]::CreateFromSessionConfigurationFile("c:\IDoNotE ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : CommandNotFoundException

Environment data

v0.4.0

> $PSVersionTable
Name                           Value
----                           -----
PSRemotingProtocolVersion      2.3
CLRVersion
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSEdition                      Core
WSManStackVersion              3.0
GitCommitId                    v0.5.0-7-g2f08a974d9024123109c466f27d169f4a1b2bf2b
BuildVersion                   3.0.0.0
SerializationVersion           1.1.0.1
PSVersion                      5.1.10032.0
$ dotnet --info
https://ci.appveyor.com/project/PowerShell/powershell/build/0.4.0.2498/artifacts

$ git rev-parse HEAD; git status
https://ci.appveyor.com/project/PowerShell/powershell/build/0.4.0.2498/artifacts

Activity

  1. andyleejordan commented on Jun 17, 2016

    @andyleejordan
    Member

    Yes, the default constructor for runspace is buggy. sergei (@vors) was investigating.

  2. vors commented on Jun 17, 2016

    @vors
    Collaborator

    Is it dup of #1092 ?

  3. andyleejordan commented on Jun 17, 2016

    @andyleejordan
    Member

    Looks like it to me. Actually Jim was investigating.

  4. added
    BVT/DRT
    on Jul 7, 2016
  5. modified the milestones: Future, on Jul 28, 2016
  6. 3 remaining items

  7. removed this from the milestone on Aug 3, 2016
  8. joeyaiello commented on Sep 2, 2016

    @joeyaiello
    Contributor

    James Truher (@JamesWTruher) Andy Jordan (@andschwa): can you confirm that this is a dupe and close this if it is?

  9. added
    Issue-Bug
    WG-Engine
    on Sep 2, 2016
  10. joeyaiello commented on May 22, 2017

    @joeyaiello
    Contributor

    Same as with #2555, we should determine if this impacts our PowerShell Standard story first. /cc Jason Shirk (@lzybkr) Hemant Mahawar (@HemantMahawar)

  11. modified the milestones: , on May 22, 2017
  12. removed this from the milestone on May 31, 2017
  13. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  14. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  15. added
    Resolution-No Activity
    on Nov 16, 2023
  16. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  17. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BVT/DRTIssue-BugResolution-No ActivityWG-Engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions