-
Notifications
You must be signed in to change notification settings - Fork 501
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
vscode-powershell / scripts / Install-VSCode.ps1 $IsLinux failure #996
Comments
This check for
|
$IsLinux is available in PS 6. The sript itself (at this point) doesn't support installation on Linux, so what's the point of switching the $Architecture to either 64-bit or 32-bit if an OS that's not supported by this script is detected? |
It doesn't; it only does that check if the OS is Windows. |
No, I did see the !. What I was wondering was why even check for that if there's no support to install on anything but Windows? Looking into a way to implement for Linux. |
Ah. Well, the bitness check only occurs for Windows; Linux and OSX go to
the "write-error' at the end.
For Linux support, would probably have to add some checks for distro,
version and bitness to grab the right package/repo.
Sent from mobile
…On Wed, Mar 21, 2018, 10:47 AM Michael Schulz ***@***.***> wrote:
No, I did see the !. What I was wondering was why even check for that if
there's no support to install on anything but Windows? Looking into a way
to implement for Linux.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#996 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHOSOjkOxH3zOSokb3ovfwWDsGLsDhx3ks5tgmflgaJpZM4O3GVC>
.
|
Correct, plus a decision whether to do a direct install from package or add repo and then install from there which would probably be the preferred way in order to keep the system up to date. |
If folks use a certain distro of linux, they're more than welcome to submit a PR with an automated installation for that distro 😃 same goes for macOS. |
System Details
$PSVersionTable
: Name ValuePSVersion 5.1.14409.1012
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1012
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
Installing using the script:
PS C:\Users\XXX> Install-Script Install-VSCode -Scope CurrentUser; Install-VSCode.ps1
C:\Users\XXX\Documents\WindowsPowerShell\Scripts\Install-VSCode.ps1 : The variable '$IsLinux' cannot be retrieved because it has not been set.
At line:1 char:51
This is because StrictMode is on, and you're checking a variable that doesn't exist. It's best practice to do checking of variables in a way that doesn't trigger errors.
The text was updated successfully, but these errors were encountered: