Skip to content

poetry --directory […] run -- pwd shows current directory #7363

@l0b0

Description

@l0b0
  • Poetry version: Poetry (version 1.3.0)

  • Python version: 3.9.16

  • OS version and name: NixOS 22.11

  • pyproject.toml: N/A

  • I am on the latest stable Poetry version, installed using a recommended method.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below. N/A

Issue

Simplest possible reproduction:

cd "$(mktemp --directory)"
mkdir test
cd test
yes '' | poetry init
cd ..
poetry --directory test run pwd

Expected output: [Temporary directory path]/test

Actual output: [Temporary directory path]

In other words, it looks like the Poetry internals run within the subdirectory, but not the command actually called by poetry run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions