-
Notifications
You must be signed in to change notification settings - Fork 498
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
adding Bits-Transfer & user switch to install latest user profile insiders edition #1477
Conversation
Hi @tabs-not-spaces, has the One consideration is that But if download robustness is an issue, we could include a special case in the script for Windows. I'm told that for resilience scenarios, |
@rjmholt currently the script only works for windows, but is set out in such a way to prepare for Linux / OSX in a future state. I lean towards using start-bitstransfer as it provides a download progress bar which is beneficial for anyone on a slower internet connection. Good idea on the async - I'll add that in and handle waiting for the file to complete. |
Yes reading the script it's pretty clear it's only for Windows at the moment, so we can just switch over to |
scripts/Install-VSCode.ps1
Outdated
@@ -167,13 +175,21 @@ if (!($IsLinux -or $IsOSX)) { | |||
break; | |||
} | |||
} | |||
if (($User -eq $true) -and ($BuildEdition -eq "Insider")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to do just if ($User -and ...)
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and about to check in
scripts/Install-VSCode.ps1
Outdated
@@ -122,6 +126,10 @@ param( | |||
[ValidateSet("stable","insider")] | |||
[string]$BuildEdition = "stable", | |||
|
|||
[Parameter()] | |||
[switch] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The convention in the rest of the file seems to be putting the type constraint on the same line as the parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed and about to check in
scripts/Install-VSCode.ps1
Outdated
@@ -56,6 +56,10 @@ | |||
A validated string defining which build edition or "stream" to download - stable or | |||
insiders edition. If the parameter is not used, then stable is downloaded as default. | |||
|
|||
.PARAMETER User |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main function of this flag is to install VSCode-Insiders (user edition) right? Instead of non-Insiders edition. If that's the case, I would vote for the flag being called something like Insiders
for now, and then if we want to make it more complex (e.g. choose between User Profile and non-User Profile) later, we could add another flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjmholt I agree with you. In that case would it make sense for now then to move from the switch into the $BuildEdition
parameter as a validation value?
Something like: [ValidateSet("stable","insider-system","insider-userprofile")]
??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a really good idea!
@tabs-not-spaces, this is a really great addition -- thanks for contributing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this looks good to me! Thanks again @tabs-not-spaces!
@rjmholt found a major flaw with my code relating to the async behavior of bits transfer. have resolved and validated it now works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! If you could just fix the merge conflict, we can put this in and republish the script :)
Thanks for your contribution @tabs-not-spaces! |
PR Summary
Quick update,
Invoke-WebRequest
toStart-BitsTransfer
(better end user experience).$BuildEdition
value - Insider-User that allows the User Profile Insiders Edition to be installed.$BuildEdition
to Insider-System to reflect the two options.PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
x
between the square brackets.Please mark anything not applicable to this PR
NA
.WIP:
to the beginning of the title and remove the prefix when the PR is ready