Skip to content

Implement running in a clean shell without parent environment #5

@taldcroft

Description

@taldcroft

I've been poking around Ska.Shell to find a way to implement running in a "clean" shell without inheriting environment from the parent. In bash this is surprisingly difficult, with probably the best solution being /bin/env - /bin/bash in order to get a completely empty bash. Then you need to source /etc/profile to get any paths. I haven't looked at tcsh.

The current concept of the env kwarg in functions is strictly additive to the current environment, so implementing this feature in a fully back-compatible way isn't completely trivial and probably needs a new keyword arg.

Relevant to sot/astromon#2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions