8000 #!/usr/local/bin/powershell bang should not load profile · Issue #992 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
#!/usr/local/bin/powershell bang should not load profile #992
Closed
@vors

Description

@vors

Steps to reproduce

Put in your PS profile

Write-Host 'PROFILE'

Create a script ./foo.ps1 and chmod +x on it

#!/usr/local/bin/powershell
Write-Host 'foo'

From bash call ./foo.ps1

Expected behavior

Should not load profile

ash-3.2$ ./foo.ps1
foo

Reason: that's how bash handles it

Actual behavior

Load profile

ash-3.2$ ./foo.ps1
PROFILE
foo

Environment data

v0.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Committee-ReviewedPS-Committee has reviewed this and made a decisionIssue-Enhancementthe issue is more of a feature request than a bugOS-LinuxResolution-No ActivityIssue has had no activity for 6 months or moreUsability(LEGACY) Helps filter issues that might be higher priority because they directly affect usabilityWG-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

      0