Skip to content

[Bug] Very Magical , can't load ps1 scripts #6319

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

Open
Super1Windcloud opened this issue Apr 5, 2025 · 4 comments
Open

[Bug] Very Magical , can't load ps1 scripts #6319

Super1Windcloud opened this issue Apr 5, 2025 · 4 comments
Labels

Comments

@Super1Windcloud
Copy link

repeat Example

Image

Let's take Scons as an example, when I after edit scons.ps1 with notepad , adding spaces and line breaks

Image

But, if I use my own written Rust code to write a PS script to scons.ps1, there is no problem, it can run normally, why?

@Super1Windcloud
Copy link
Author

CMD shim is normal , only ps1 scripts

@Super1Windcloud
Copy link
Author

And , when I edit cmd shim , cmd can run normally , but ps1 can't

@Super1Windcloud
Copy link
Author

I can use unblock-file

@HUMORCE
Copy link
Member

HUMORCE commented Apr 19, 2025

Check execution policies

❯ Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined  <- Should be 'RemoteSigned' when you have install Scoop following the quickstart
 LocalMachine    RemoteSigned

~
❯ Get-ExecutionPolicy
RemoteSigned

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