Skip to content
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

Add Execution Policy setting to Powershell based shell plugins #1505

Conversation

herronelou
Copy link
Contributor

Closes #1504

This is a simple implementation of what I was requesting in #1504

I considered a different approach which would have been a bit more generic such as shell_args, which could have included the -NoLogo which is currently being inserted all the time. However, after reviewing the other shell plugins, I couldn't see the case for shell args for all of them, so I kept it localized to only doing exactly what I needed.

@herronelou herronelou requested review from nerdvegas and a team as code owners July 4, 2023 21:11
@sonarcloud
Copy link

sonarcloud bot commented Jul 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@maxnbk
Copy link
Contributor

maxnbk commented Sep 6, 2023

I rebased to get the CI fixed, but the PR needs DCO fixed (commit signoff)

@maxnbk maxnbk added the Blocked by DCO Waiting on commit signoff label Sep 6, 2023
@maxnbk
Copy link
Contributor

maxnbk commented Sep 9, 2023 via email

@herronelou
Copy link
Contributor Author

herronelou commented Sep 9, 2023 via email

@JeanChristopheMorinPerso
Copy link
Member

JeanChristopheMorinPerso commented Sep 9, 2023

We could add strict values, but why not just use a regex and save us the trouble of having to follow windows/powershell releases/changes?

@herronelou
Copy link
Contributor Author

I'm fine with either.
The seven PowerShell execution policies are: Default, Restricted, RemoteSigned, AllSigned, Unrestricted, Bypass, and Undefined.
@maxnbk @JeanChristopheMorinPerso you tell me which you prefer and I'll go with it. It doesn't look like policies are updated very frequently, the oldest documentation I can find (powershell 3.0) has the same policies.

@JeanChristopheMorinPerso
Copy link
Member

@maxnbk you forgot to add -s when you rebased.

@JeanChristopheMorinPerso
Copy link
Member

Hi @herronelou , do you think you could follow the instructions at https://github.com/AcademySoftwareFoundation/rez/pull/1505/checks?check_run_id=16687974501 please? I'd like to merge this but we need commits to be signed off. Thanks!

Signed-off-by: Erwan Leroy <herronelou@gmail.com>
Copy link
Member

@JeanChristopheMorinPerso JeanChristopheMorinPerso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Hopefully that will be enough for when we enable power shell by default in 3.0.

@herronelou
Copy link
Contributor Author

@JeanChristopheMorinPerso can you confirm if I fixed it fine?

@JeanChristopheMorinPerso
Copy link
Member

Yep, it looks fine. The DCO bot says that everything is properly signed off.

@JeanChristopheMorinPerso JeanChristopheMorinPerso added this to the 3.0.0 milestone Feb 4, 2024
@JeanChristopheMorinPerso JeanChristopheMorinPerso removed the Blocked by DCO Waiting on commit signoff label Feb 4, 2024
@JeanChristopheMorinPerso JeanChristopheMorinPerso removed this from the 3.0.0 milestone Feb 4, 2024
@JeanChristopheMorinPerso JeanChristopheMorinPerso merged commit aff89bd into AcademySoftwareFoundation:main Feb 4, 2024
55 checks passed
@JeanChristopheMorinPerso
Copy link
Member

Thanks @herronelou, this will be released in 3.0.

Pixel-Minions pushed a commit to Pixel-Minions/rez that referenced this pull request Feb 14, 2024
…mySoftwareFoundation#1505)

Signed-off-by: Erwan Leroy <herronelou@gmail.com>
Signed-off-by: Jose Enriquez <jose.enriquez@barnstormvfx.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to configure execution policy for Powershell/pwsh plugins
3 participants