A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Microsoft/vscode-python/issues/17426 below:

Shell doesn't support Cygwin zsh · Issue #17426 · microsoft/vscode-python · GitHub

A possible addition to #4568:

  1. When using Cygwin's zsh as my shell, the extension sends the PowerShell command & "C:/Program Files/Python39/python.exe" c:/Users/edemaine/.../filename.py. zsh doesn't understand the leading &. Relevant configuration:

     "terminal.integrated.defaultProfile.windows": "Cygwin ZSH",
     "terminal.integrated.automationShell.windows": "C:\\cygwin\\bin\\zsh.exe",
     "terminal.integrated.profiles.windows": {
         "PowerShell": {
                 "source": "PowerShell",
                 "icon": "terminal-powershell"
         },
         "Command Prompt": {
                 "path": [
                         "${env:windir}\\Sysnative\\cmd.exe",
                         "${env:windir}\\System32\\cmd.exe"
                 ],
                 "args": [],
                 "icon": "terminal-cmd"
         },
         "Git Bash": {
                 "source": "Git Bash"
         },
         "Cygwin ZSH": {
                 "path": [
                         "c:\\cygwin\\bin\\zsh.exe",
                         "c:\\cygwin64\\bin\\zsh.exe"
                 ],
                 "args": [
                         "-i"
                 ]
         }
     }
  2. When using Cygwin's zsh as my shell and Windows cmd as my automation shell, the extension runs Python in zsh (and then runs the PowerShell command):

     "terminal.integrated.defaultProfile.windows": "Cygwin ZSH",
     "terminal.integrated.automationShell.windows": "C:\\Windows\\System32\\cmd.exe",

    I'm confused by this one because I thought it was fixed in a recent update (last week). But now it seems to be broken again.

Environment data Logs Output for Python in the Output panel (in the second scenario above)
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'pythonDeprecatePythonPath'
User belongs to experiment group 'pythonSortEnvs'
User belongs to experiment group 'pythonRunFailedTestsButtonDisplayedcf'
User belongs to experiment group 'pythonRefreshTestsButtonDisplayed'
User belongs to experiment group 'pythonRememberDebugConfigcf'
Info 2021-09-15 15:59:43: Testing: Setting up watcher for c:\Users\edemaine\...
Info 2021-09-15 15:59:43: Searching for conda.
Info 2021-09-15 15:59:43: Probing conda binary: conda
Info 2021-09-15 15:59:43: Error: spawn conda ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn conda',
  path: 'conda',
  spawnargs: [ 'info', '--json' ]
}
Info 2021-09-15 15:59:44: Watcher disabled
Info 2021-09-15 15:59:44: Watcher disabled
Info 2021-09-15 15:59:44: Searching for workspace virtual envs in: c:\Users\edemaine\...
Info 2021-09-15 15:59:44: Getting roots
Info 2021-09-15 15:59:44: Found roots
Info 2021-09-15 15:59:44: Watcher disabled
Info 2021-09-15 15:59:44: Getting roots
Info 2021-09-15 15:59:44: Found interpreter for C:\Program Files\Python39\python.exe,c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\pythonFiles\interpreterInfo.py
Info 2021-09-15 15:59:44: Found roots
Info 2021-09-15 15:59:44: Start watching root c:\Users\edemaine\... for globs ["python.exe","*/python.exe","*/Scripts/python.exe"]
Info 2021-09-15 15:59:44: Start watching: c:\Users\edemaine\... with pattern python.exe using VSCode API
Info 2021-09-15 15:59:44: Start watching: c:\Users\edemaine\... with pattern */python.exe using VSCode API
Info 2021-09-15 15:59:44: Start watching: c:\Users\edemaine\... with pattern */Scripts/python.exe using VSCode API
Info 2021-09-15 15:59:44: Found interpreter for C:\Program Files\Inkscape\python.exe,c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\pythonFiles\interpreterInfo.py
Info 2021-09-15 15:59:45: Couldn't locate the conda binary.
Info 2021-09-15 15:59:45: Environments added to cache [{"name":"","location":"","kind":"global-system","executable":{"filename":"C:\\Program Files\\Inkscape\\python.exe","sysPrefix":"C:/Program Files/Inkscape","ctime":-1,"mtime":-1},"display":"Python 2.7.15 64-bit (system)","version":{"major":2,"minor":7,"micro":15,"release":{"level":"final","serial":0},"sysVersion":"2.7.15 (default, Oct 11 2018, 12:09:51)  [GCC 8.2.0 64 bit (AMD64)]"},"arch":3,"distro":{"org":""},"source":["path env var"]},{"name":"","location":"","kind":"global-other","executable":{"filename":"C:\\Program Files\\Python39\\python.exe","sysPrefix":"C:\\Program Files\\Python39","ctime":-1,"mtime":-1},"display":"Python 3.9.7 64-bit","version":{"major":3,"minor":9,"micro":7,"release":{"level":"final","serial":0},"sysVersion":"3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]"},"arch":3,"distro":{"org":"PythonCore","defaultDisplayName":"Python 3.9 (64-bit)"},"source":["path env var","windows registry"]}]
Info 2021-09-15 15:59:45: Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined
Info 2021-09-15 15:59:45: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Python interpreter path: C:\Program Files\Python39\python.exe
Info 2021-09-15 15:59:45: Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined
Info 2021-09-15 15:59:45: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Starting Pylance language server.
Error 2021-09-15 15:59:45: Failed to check if file needs to be fixed EntryNotFound (FileSystemError): Unable to read file 'c:\Users\edemaine\...\.vscode\settings.json' (Error: Unable to resolve non-existing file 'c:\Users\edemaine\...\.vscode\settings.json')
    at _handleError (c:\Users\edemaine\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:94:160087)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at y.readText (c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\out\client\extension.js:9:314351)
    at p.doesFileNeedToBeFixed (c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\out\client\extension.js:59:823969)
    at c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\out\client\extension.js:59:823096
    at async Promise.all (index 1)
    at p.getFilesToBeFixed (c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\out\client\extension.js:59:823042)
    at p.updateTestSettings (c:\Users\edemaine\.vscode\extensions\ms-python.python-2021.9.1230869389\out\client\extension.js:59:822669) {
  code: 'FileNotFound'
}
Info 2021-09-15 15:59:46: Starting language server, Class name = r, completed in 685ms, has a falsy return value, , Return Value: undefined
Info 2021-09-15 15:59:46: Cached data exists getEnvironmentVariables, c:\Users\edemaine\...\filename.py
Info 2021-09-15 15:59:46: [object Object]. Shell identified as undefined 
Info 2021-09-15 15:59:46: Shell path 'c:\cygwin\bin\zsh.exe'
Info 2021-09-15 15:59:46: Shell path identified as shell 'other'
Info 2021-09-15 15:59:46: Terminal shell path 'c:\cygwin\bin\zsh.exe' identified as shell 'other'
Info 2021-09-15 15:59:46: [object Object]. Shell identified as other 
Info 2021-09-15 15:59:46: Shell path from user settings 'null'
Info 2021-09-15 15:59:46: [object Object]. Shell identified as other 
Info 2021-09-15 15:59:46: Shell path 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe'
Info 2021-09-15 15:59:46: Shell path identified as shell 'powershell'
Info 2021-09-15 15:59:46: Shell path from user env 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe'
Info 2021-09-15 15:59:46: [object Object]. Shell identified as powershell 
Info 2021-09-15 15:59:46: Shell identified as 'powershell'
Info 2021-09-15 15:59:46: Searching for conda.
Info 2021-09-15 15:59:46: Searching for conda.
Info 2021-09-15 15:59:46: > conda --version
> conda --version
Info 2021-09-15 15:59:46: Display locator refreshing progress, Class name = g, completed in 1ms, has a falsy return value, , Return Value: undefined
Info 2021-09-15 15:59:46: Hide locator refreshing progress, Class name = g, completed in 0ms, has a falsy return value, , Return Value: undefined
Info 2021-09-15 15:59:46: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-09-15 15:59:46: Cached data exists getEnvironmentVariables, c:\Users\edemaine\...

Notably, I don't notice any shell identification logs from baseShellDetector. Does this code not get run on Windows?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4