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 parameter "-NoProfile" to powershell command #41

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

hhaensel
Copy link
Contributor

Adds the command line parameter -NoProfile to the powershell command to avoid error messages on some systems and faster execution.

Adds the command line parameter `-NoProfile` to the powershell command to avoid error messages on some systems and faster execution.
@hhaensel
Copy link
Contributor Author

Sorry for the uninvited commit.
I'm receiving an error message on my windows system like the following:

. : Die Datei "C:\Users\helmu\OneDrive\Dokumente\WindowsPowerShell\profile.ps1" kann nicht geladen werden, da die Ausführung   
von Skripts auf diesem System deaktiviert ist. Weitere Informationen finden Sie unter "about_Execution_Policies"
(https:/go.microsoft.com/fwlink/?LinkID=135170).
In Zeile:1 Zeichen:3
+ . 'C:\Users\helmu\OneDrive\Dokumente\WindowsPowerShell\profile.ps1'
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : Sicherheitsfehler: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

Adding the flag doesn't try to execute the profile script and therefore doesn't error and is faster.

Hope you like it.

Otherwise. Very handy package, thanks!

@hhaensel hhaensel mentioned this pull request Aug 27, 2023
@codecov
Copy link

codecov bot commented Aug 27, 2023

Codecov Report

Merging #41 (290e25d) into main (f2c0b4c) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #41   +/-   ##
=======================================
  Coverage   79.51%   79.51%           
=======================================
  Files           5        5           
  Lines          83       83           
=======================================
  Hits           66       66           
  Misses         17       17           
Files Changed Coverage Δ
src/_powershell.jl 100.00% <100.00%> (ø)

Copy link
Owner

@hyrodium hyrodium left a comment

Choose a reason for hiding this comment

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

I didn't know the option -NoProfile. Thank you!

@hyrodium hyrodium merged commit f993e87 into hyrodium:main Aug 28, 2023
9 checks passed
@hhaensel
Copy link
Contributor Author

Thanks for yor fast reaction! 🚀

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.

None yet

2 participants