Skip to content

--output relative to the project directory even when running from another directory #77

@touilleMan

Description

@touilleMan

Poetry can be run from within a sub directory, hence the command poetry export --output foo/requirements.txt can misleading:

$ ls
my_project
pyproject.toml
$ mkdir tmp && pushd tmp  # Go in a sub directory
$ mkdir foo
$ poetry export --output foo/requirements.txt  # User expects to write into C:\\Users\\gbleu\\my_project\\tmp\\foo\\requirements.txt
[Errno 2] No such file or directory: 'C:\\Users\\gbleu\\my_project\\foo\\requirements.txt'
$ poetry export --output requirements.txt  # User expects to write into C:\\Users\\gbleu\\my_project\\tmp\\requirements.txt
$ ls
$ ls ..  # export have been actually written into C:\\Users\\gbleu\\my_project\\requirements.txt
my_project
pyproject.toml
requirements.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions