question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Download Now" button should respect the used installation method on Linux

See original GitHub issue

Issue Type

Bug

Description

Edit: Originally this issue was specifically about the .deb installation method, but since this problem is not specific to it, I edited the issue to be more general.

How to reproduce

  1. Install (an outdated version of) VS Code using one of the installation methods.
  2. Open VSCode and wait for the (1) to appear on the settings icon.
  3. Click on the settings icon and then on Download Now.

Expected behavior

VSCode starts the download of the latest version’s file (when the .tar.gz was used to install VS Code) or instructs the user to run an update through the relevant package manager.

Actual behavior

VS Code always starts the download of the latest version’s .tar.gz file.

Possible solution

VS Code could check what type of download was used to install and behave differently based on that. Checking whether a .deb was used could look something like this:

import { spawn } from 'child_process';

export function isDebInstallation(): Promise<boolean> {
  return new Promise(resolve => {
    spawn('dpkg', ['--list', 'code']).on('close', code => {
      resolve(code === 0);
    });
  });
}

Another option would be to include the information about what installation method was used in the release.

VS Code Info

VS Code version: Code 1.20.0 (c63189deaa8e620f650cc28792b8f5f3363f2c5b, 2018-02-07T17:10:15.949Z) OS version: Linux x64 4.13.0-32-generic

System Info
Item Value
CPUs Intel® Core™ i5-4590 CPU @ 3.30GHz (4 x 3300)
Load (avg) 1, 1, 1
Memory (System) 15.61GB (10.31GB free)
Process Argv /usr/share/code/code .
Screen Reader no
VM 0%
Reproduces without extensions

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:24
  • Comments:29 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
Tyriarcommented, Mar 14, 2018

The think the ideal behavior for deb and rpm would actually be to either not show the download now button at all, or query the detected apt/yum/dnf for whether there is an update and then provide a notification (which defers to software updater?)

2reactions
monkeyhybridcommented, Aug 14, 2018

@kanishk98 I just tested with a Ubuntu 16.04 virtual machine and you’re right, no default support for PackageKit. It’s an LTS release too, so could be around for a few years to come. Hmmm, that’s a shame. 😦

So I guess that leaves the options as:-

  • Use apt, dpkg, dnf, yum, etc, to test if code package was installed.
  • Require PackageKit as a package dependency (seems a bit overkill - maybe has other consequences?)
  • Make tailored builds for package releases that disable update checks.
  • Add an option to settings.json to allow users to disable update checks (which could be handy for other corner cases).
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Download and Install Linux (Ubuntu) on Windows PC
1. Download the .iso or the OS files on your computer from this link. 2. Download free software like ‘Universal USB installer to...
Read more >
How to Download and Install Linux (on Windows)
Click the START button. Users have the option of running Ubuntu without going through the installation process, however, this tutorial will show ...
Read more >
Simple Guide For Installation of Linux in Windows - eduCBA
Guide to how to Install Linux?. Here we have discussed the basic instructions and different steps of installing Linux in easier and simplest...
Read more >
4.2. Installing, Step by Step
For a standard installation, you only need to choose “Install” or “Graphical install” (with the arrow keys), then press the Enter key to...
Read more >
Installation Guide Red Hat Enterprise Linux 7
However, Anaconda can also be used to configure advanced installation ... On most Linux distributions, it will work without the need for installing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found