You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ModuleFast.psm1
+33-4Lines changed: 33 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,13 @@ using namespace System.Threading.Tasks
23
23
#Probably need to take into account inconsistent state, such as if a dependent module fails then the depending modules should be removed.
24
24
$ErrorActionPreference='Stop'
25
25
26
+
if ($ENV:CI) {
27
+
Write-Verbose'CI Environment Variable is set, this indicates a Continuous Integration System is being used. ModuleFast will suppress prompts by setting ConfirmPreference to None and forcing confirmations to false. This is to ensure that ModuleFast can be used in CI/CD systems without user interaction.'
28
+
#Module Scope which should carry to other called commands
if ((Get-Content-Raw $myProfile) -notmatch [Regex]::Escape($ProfileLine)) {
1725
-
if (-not$PSCmdlet.ShouldProcess($myProfile,"Allow ModuleFast to work by adding $Destination to your PSModulePath on startup by appending to your CurrentUserAllHosts profile. If you do not want this, add -NoProfileUpdate to Install-ModuleFast or add the specified destination to your powershell.config.json or to your PSModulePath another way.")) { return }
1734
+
if (-not(Approve-Action$myProfile"Allow ModuleFast to work by adding $Destination to your PSModulePath on startup by appending to your CurrentUserAllHosts profile. If you do not want this, add -NoProfileUpdate to Install-ModuleFast or add the specified destination to your powershell.config.json or to your PSModulePath another way.")) { return }
1726
1735
Write-Verbose"Adding $Destination to profile $myProfile"
0 commit comments