-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAM-detect: give priority to user setting
Instead of eager-detecting SAM CLI and force-updating the user setting, 1. Never force-update the user setting (unless user invokes `AWS: Detect SAM CLI` command). * Eliminates lots of complexity, e.g.: * Because the `aws.samcli.location` config is `Global`, a change in _any_ VSCode instance will trigger `onDidChangeConfiguration` in _all_ running VSCode instances. * VSCode shares settings between local and remote instances. (This may depend on the `remote.SSH.useLocalServer` setting?) 2. At various sites where SAM CLI is needed, auto-detect SAM CLI if and only if the user setting is empty. * We cannot "validate" SAM CLI location because in a remote session, `require('fs').existsSync('/home/linuxbrew/.linuxbrew/bin/sam')` returns false even if the path is valid in WSL. #1300 TEST CASES - Set `samcli.location` setting to an invalid path. - On startup, AWS Toolkit should _not_ warn about the invalid path. - Invoking `AWS: Detect SAM CLI` _should_ update the setting. - Clear the `samcli.location` setting then restart vscode. - On startup, AWS Toolkit should _not_ validate nor update the `samcli.location` setting. - Invoking `AWS: Detect SAM CLI` _should_ update the setting. Followup (and partial revert) of #1241.
- Loading branch information
Showing
9 changed files
with
103 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters