Skip to content

Poetry run no longer executes local bash scripts #7959

@oefe

Description

@oefe
  • 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.

Issue

In Poetry 1.4.2, you could execute local shell scripts using poetry run, e.g. poetry run ./pyright.sh.

This no longer works with Poetry 1.5

>ls -l *.sh
-rwxr-xr-x  1 user  staff  1871 May 19 17:49 pyright.sh*

>head -n 1 pyright.sh
#!/bin/bash

>poetry ./pyright.sh
The command "./pyright.sh" does not exist.

>poetry pyright.sh
The command "./pyright.sh" does not exist.

The changelog mentions #7606, but this should only affect python scripts listed in [tool.poetry.scripts], which is not the case here.

So I would expect that this still works.

Workaround

Explicitly calling bash with the script as argument, i.e. poetry run bash ./pyright.sh still works

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cliRelated to the command linekind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions