zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.58k stars 3.13k forks source link

Remote Development - Cannot connect if default shell on remote machine is Nushell #21005

Open jaredramirez opened 3 days ago

jaredramirez commented 3 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When connecting to a remote machine with Zed, and the remote machine's default shell is Nushell, Zed fails to connect with the error:

Error: nu::parser::unknown_flag

  × The `uname` command doesn't have flag `-s`.
   ╭─[entry #9:1:8]
 1 │ uname -s
   ·        ┬
   ·        ╰── unknown flag
   ╰────
  help: Available flags: --help(-h). Use `--help` for more information.

This occurs after entering in the PW for the remote machine, and the error appears in a popup modal.

Environment

Client Machine:

Zed: v0.162.3 (Zed)
OS: macOS 14.3.1
Memory: 16 GiB
Architecture: aarch64

Remote Machine: Same version of Zed NixOS, Nix version 2.24.9 x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log ``` 2024-11-21T09:51:33.480238-08:00 [INFO] ========== starting zed ========== 2024-11-21T09:51:33.546539-08:00 [INFO] Opening main db 2024-11-21T09:51:33.548469-08:00 [INFO] Opening main db 2024-11-21T09:51:33.566233-08:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git") 2024-11-21T09:51:33.596337-08:00 [INFO] set environment variables from shell:/run/current-system/sw/bin/nu, path:/Users/jaredramirez/.nix-profile/bin:/etc/profiles/per-user/jaredramirez/bin:/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/homebrew/bin 2024-11-21T09:51:33.76598-08:00 [INFO] No prompt template overrides directory found at /Users/jaredramirez/.config/zed/prompt_overrides. Using built-in prompts. 2024-11-21T09:51:33.766314-08:00 [INFO] extensions updated. loading 2, reloading 0, unloading 0 2024-11-21T09:51:33.822193-08:00 [INFO] Opening main db 2024-11-21T09:51:33.828849-08:00 [INFO] building git repository, `.git` path in the worktree: ".git" 2024-11-21T09:51:33.870759-08:00 [INFO] Opening main db 2024-11-21T09:51:33.883871-08:00 [INFO] open paths ["/Users/jaredramirez/.config/zed/settings.json"] 2024-11-21T09:51:34.221262-08:00 [INFO] Opening main db 2024-11-21T09:51:34.242099-08:00 [INFO] Node runtime install_if_needed 2024-11-21T09:51:34.254433-08:00 [INFO] attempting to start language server "json-language-server", path: "/Users/jaredramirez/.config/zed/settings.json", id: 1 2024-11-21T09:51:34.255224-08:00 [INFO] fetching latest version of language server "json-language-server" 2024-11-21T09:51:34.270768-08:00 [ERROR] login shell exited with exit status: 1 2024-11-21T09:51:34.523612-08:00 [INFO] starting language server process. binary path: "/Users/jaredramirez/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/", args: ["/Users/jaredramirez/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"] 2024-11-21T09:51:34.525283-08:00 [INFO] Node runtime install_if_needed 2024-11-21T09:51:34.608335-08:00 [INFO] attempting to start language server "hls", path: "/Users/jaredramirez/dev/gitlab/costar/horrorscope-backend", id: 2 2024-11-21T09:51:34.611078-08:00 [ERROR] Failed to start language server "hls": hls must be installed via ghcup 2024-11-21T09:51:34.611154-08:00 [ERROR] server stderr: "" 2024-11-21T09:51:34.7517-08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 0, "message": "[DEBUG] [agent] [2024-11-21T17:51:34.747Z] Agent service starting", "metadataStr": "[DEBUG] [agent] [2024-11-21T17:51:34.747Z]", "extra": [ "Agent service starting" ] } 2024-11-21T09:51:34.751884-08:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability: { "registrations": [ { "id": "e19a2634-29ba-49cc-aead-ed6ebe4cb3f7", "method": "workspace/didChangeWorkspaceFolders", "registerOptions": {} } ] } 2024-11-21T09:51:35.126022-08:00 [INFO] downloading language server "json-language-server" 2024-11-21T09:51:35.126198-08:00 [INFO] Node runtime install_if_needed 2024-11-21T09:51:35.207028-08:00 [INFO] Node runtime install_if_needed 2024-11-21T09:51:35.260452-08:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 0, "message": "[DEBUG] [agent] [2024-11-21T17:51:35.258Z] Telemetry initialized", "metadataStr": "[DEBUG] [agent] [2024-11-21T17:51:35.258Z]", "extra": [ "Telemetry initialized" ] } 2024-11-21T09:51:35.285374-08:00 [INFO] using project environment for language server LanguageServerName("json-language-server") 2024-11-21T09:51:35.285473-08:00 [INFO] starting language server process. binary path: "/Users/jaredramirez/Library/Application Support/Zed/node/node-v22.5.1-darwin-arm64/bin/node", working directory: "/Users/jaredramirez/.config/zed", args: ["/Users/jaredramirez/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"] 2024-11-21T09:51:43.359432-08:00 [ERROR] Failed to open project: failed to run command: Error: nu::parser::unknown_flag × The `uname` command doesn't have flag `-s`. ╭─[source:1:8] 1 │ uname -sm ·  ┬ · ╰── unknown flag ╰────  help: Available flags: --help(-h). Use `--help` for more information. ```