Skip to content

fix: check and install analyzers in the WSL distribution that runs the scan - #47

Open
Arthurvroum wants to merge 2 commits into
mainfrom
40-wsl-distro-for-tools
Open

Arthurvroum wants to merge 2 commits into
mainfrom
40-wsl-distro-for-tools

Conversation

@Arthurvroum

Copy link
Copy Markdown
Collaborator

With two WSL distributions, a source under \wsl$<non-default> runs in
that distribution, but the preflight and the installer always used the
default one: checking or repairing tools there gave the wrong answer.

  • executionDistro() picks the distribution with the same rule as the
    command builder: the one of a WSL path when it is not the default,
    else the default (null). Ordinary Windows paths keep the default.
  • The preflight checks the analyzers there, and its Install button
    installs them there. The sidebar's install button uses the
    distribution of the active file.

Builds on the replaceable wsl.exe calls of #39.

Stacked on #46 (the fix for #39): merge that PR first; this diff includes its commit.

Fixes #40

… on rejection

Paths with spaces are accepted since the validator checks option names
strictly and only rejects shell syntax in values. Two gaps remained:

- In the temporary-copy branch, the CLI was copied before the arguments
  were validated, so a rejected argument left the copy behind. They are
  now validated first, and temporary files are removed on any failure.
- Neither Windows branch was tested outside Windows. The calls to wsl.exe
  are now replaceable, so a report and a compile database under
  "C:\My Project" are checked to stay single arguments through the
  temporary-copy branch and through the branch that runs in the WSL
  distribution holding the source, on every platform.

Fixes #39
…e scan

With two WSL distributions, a source under \\wsl$\<non-default> runs in
that distribution, but the preflight and the installer always used the
default one: checking or repairing tools there gave the wrong answer.

- executionDistro() picks the distribution with the same rule as the
  command builder: the one of a WSL path when it is not the default,
  else the default (null). Ordinary Windows paths keep the default.
- The preflight checks the analyzers there, and its Install button
  installs them there. The sidebar's install button uses the
  distribution of the active file.

Builds on the replaceable wsl.exe calls of #39.

Fixes #40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check and install analyzers in the WSL distribution used for the scan

1 participant