Skip to content

ValueError when $SHELL is not an absolute path. #2

@cedws

Description

@cedws

Originally filed as rust-lang/rust-enhanced#391.

When the user's $SHELL is not an absolute path (for example, zsh and not /bin/zsh), the call to rsplit() on line 44 below will throw a ValueError. This is because the $SHELL string contains no slashes.

if shell is None:
shell = get_user_login_shell()
_, shell_name = shell.rsplit('/', 1)
output_type = 'bytes' if sys.version_info < (3,) and for_subprocess else 'unicode'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions