Skip to content

Repository add fails when login shell is Nushell (SHELL=nu) #100

@khoi

Description

@khoi

Summary

When a user’s login shell is Nushell (nu), repository validation/add flows can fail with not a git repository even for valid git repos.

User-visible problems

  • Supacode reports not a git repository for valid repositories.
  • Repository add/open flow is blocked for users whose shell is nu.
  • Error message is misleading, making diagnosis difficult.

Reproduction

  1. Set login shell or SHELL env to Nushell (example: /run/current-system/sw/bin/nu).
  2. Launch Supacode.
  3. Try to add/open a valid git repository.
  4. Observe failure with not a git repository.

Expected

  • Adding/opening a valid repo should succeed regardless of whether the user’s shell is bash, zsh, fish, nu, etc.
  • If a shell is unsupported for login command execution, Supacode should fall back to a supported shell path and continue.

Actual

  • Supacode picks the shell from SHELL/passwd directly.
  • Login command execution uses a POSIX-style invocation (-l -c plus POSIX command snippets).
  • With nu, this invocation is incompatible, command execution fails, and repo detection surfaces as not a git repository.

Suspected root cause

Shell selection and login command construction assume POSIX shells, but SHELL may point to a non-POSIX shell (Nushell).

Notes

This is currently reproducible on setups that default to Nushell (commonly Nix/NixOS environments).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions