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
merged 1 commit into from
Oct 4, 2016
Merged

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

merged 1 commit into from
Oct 4, 2016

Conversation

bmanikm
Copy link
Contributor

@bmanikm bmanikm commented Oct 3, 2016

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
Copy link

msftclas commented Oct 3, 2016

Hi @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
Copy link

@jianyunt jianyunt Oct 3, 2016

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
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)
Copy link

@jianyunt jianyunt Oct 3, 2016

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
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

jianyunt commented Oct 4, 2016

: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