VSCode unwanted script calls: `Failed to run "powershell -ExecutionPolicy Bypass -File [...]`
- Dominant language
- TypeScript
- Stars
- 111
- Forks
- 109
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 20
Description
### Describe the Bug with repro steps
1. Put the following in the settings.json in `.vscode` (workspace settings):
```json
{
"azureLogicAppsStandard.autoRuntimeDependenciesValidationAndInstallation": false,
"azureLogicAppsStandard.validateDotNetSDK": false,
"azureLogicAppsStandard.validateFuncCoreTools": false,
}
```
2. Install `5.58.9` of `ms-azuretools.vscode-azurelogicapps`
3. See the following log when activating the extension:
```
C:\Users\...\AppData\Local\Temp\.azurelogicapps\DotNetSDK\DotNetSDK.ps1 : Cannot dot-source this command because it
was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator.
+ CategoryInfo : InvalidOperation: (:) [DotNetSDK.ps1], NotSupportedException
+ FullyQualifiedErrorId : DotSourceNotSupported,DotNetSDK.ps1
C:\Users\...\AppData\Local\Temp\.azurelogicapps\DotNetSDK\DotNetSDK.ps1 : Cannot dot-source this command because it
was defined in a different language mode. To invoke this command without importing its contents, omit the '.' operator.
+ CategoryInfo : InvalidOperation: (:) [DotNetSDK.ps1], NotSupportedException
+ FullyQualifiedErrorId : DotSourceNotSupported,DotNetSDK.ps1
```
I'm on a managed VM and cannot have this extension call (or source) scripts like that, i hoped that settings the validation settings to false would skip working with these scripts...
If i put the settings in the User `settings.json` it does seem to work. I don't expect workspace settings to work differently...
### What type of Logic App Is this happening in?
Standard (VSCode)
### Which operating system are you using?
Windows
### Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
### Workflow JSON
```json
```
### Screenshots or Videos
_No response_
### Browser
.
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce extension activation with the validation settings in workspace settings.json, then compare it with the same settings in User settings.json. Trace how these settings control the DotNetSDK.ps1 and related PowerShell calls; done means disabled validation does not invoke or source those scripts in the workspace configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100