Skip to content

Problems when sourcing a file #66

@guilhermeleobas

Description

@guilhermeleobas

Hi,

When sourcing a file, the sourcing process happens in the dir that the script is running and not in the one specified by cwd. For instance, if one is in /foo and the script below is in /foo/bar/baz, the variable var is equal to foo and not baz. It's possible to add a flag indicating where the sourcing happens?

export var=$(basename $(pwd))

Also, the path src script must always be absolute or can be relative to cwd?

with Sultan.load(
        cwd='/foo/bar',
        src='baz/config.sh') as s:
    s.pip(...)

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions