Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Merging the PowerShellGet changes from PowerShell\PowerShell repo. - #4

Merged
Manikyam Bavandla (bmanikm) merged 1 commit into
PowerShell:masterfrom
bmanikm:manikb_psget
Oct 4, 2016
Merged

Manikyam Bavandla (bmanikm) merged 1 commit into
PowerShell:masterfrom
bmanikm:manikb_psget

Conversation

@bmanikm

Copy link
Copy Markdown
Contributor

Includes the fix for PowerShell/PowerShell#2286 to provide proper error message when an user is trying to install a module/script as non-root user.
#2

Includes the fix for PowerShell/PowerShell#2286 to provide proper error message when an user is trying to install a module/script as non-root user.
#2
@msftclas

Hi Manikyam Bavandla (@bmanikm), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;


if($ev)
{
$script:IsRunningAsElevated = $false

@jianyunt Jianyun (jianyunt) Oct 3, 2016 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

$script:IsRunningAsElevated = $false [](start = 12, length = 36)

what's the reason we need to set IsRunnignAsElevated to false before throwing? #Closed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will be used for next install/update command to throw proper error/warning prior to downloading. This is used in Test-RunningAsElevated function.

$adm=[System.Security.Principal.WindowsBuiltInRole]::Administrator
$script:IsRunningAsElevated = $prp.IsInRole($adm)
}
elseif($script:IsCoreCLR)

@jianyunt Jianyun (jianyunt) Oct 3, 2016 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

elseif($script:IsCoreCLR) [](start = 8, length = 25)

does this mean on CoreCLR we always require admin? #Closed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, for Linux and Max, we assume that user has the admin rights, $script:IsRunningAsElevated will be updated on first copy error.

@jianyunt

Copy link
Copy Markdown

:shipit:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants