Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew install poetry - completion.d - unexpected token clear'` #111924

Closed
jimsmith opened this issue Sep 28, 2022 · 7 comments
Closed

brew install poetry - completion.d - unexpected token clear'` #111924

jimsmith opened this issue Sep 28, 2022 · 7 comments
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity upstream issue An upstream issue report is needed

Comments

@jimsmith
Copy link

brew gist-logs <formula> link OR brew config AND brew doctor output

$ brew gist-logs poetry
Error: No logs.
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  unrar



### Verification

- [X] I ran `brew update` and am still able to reproduce my issue.
- [X] I have resolved all warnings from `brew doctor` and that did not fix my problem.

### What were you trying to do (and why)?

Open an interactive terminal.

### What happened (include all command output)?

Last login: Wed Sep 28 23:19:55 on ttys004
-bash: /usr/local/etc/bash_completion.d/poetry: line 40: syntax error near unexpected token clear' -bash: /usr/local/etc/bash_completion.d/poetry: line 40: (cache clear)'

The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.


### What did you expect to happen?

Last login: Wed Sep 28 23:19:55 on ttys004
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.


### Step-by-step reproduction instructions (by running `brew` commands)

```shell
Running `brew update --auto-update`... updated poetry


==> Upgrading poetry
  1.1.13 -> 1.2.1

After this update open a new interactive terminal I am presented with:

-bash: /usr/local/etc/bash_completion.d/poetry: line 40: syntax error near unexpected token `clear'
-bash: /usr/local/etc/bash_completion.d/poetry: line 40: `            (cache clear)'

Removing poetry 1.2.1 removes this error when opening a new interative terminal.

I can reproduce this by simply installing poetry 1.2.1 (using brew)

$ brew install poetry
==> Downloading https://ghcr.io/v2/homebrew/core/poetry/manifests/1.2.1
Already downloaded: /Users/jim.smith/Library/Caches/Homebrew/downloads/cb708b02063419e7b2696d992f105d566d83aad8eaa011d135aeae3901f1be7c--poetry-1.2.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/poetry/blobs/sha256:d66508f0eb043a1be17f82e0e466ab81e69c52fabc74141cc1fe5770a53777ce
Already downloaded: /Users/jim.smith/Library/Caches/Homebrew/downloads/2e4d80a7b07be94f8917af6c8d7efd235c61c55f46fb50935eb3071c055ad6c2--poetry--1.2.1.monterey.bottle.tar.gz
==> Pouring poetry--1.2.1.monterey.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/poetry/1.2.1: 2,192 files, 29.7MB
==> Running `brew cleanup poetry`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

@jimsmith jimsmith added the bug Reproducible Homebrew/homebrew-core bug label Sep 28, 2022
@jimsmith jimsmith changed the title brew install poetry - completion.d - unexpected token `clear' brew install poetry - completion.d - unexpected token clear'` Sep 28, 2022
@cho-m cho-m added the upstream issue An upstream issue report is needed label Sep 29, 2022
@cho-m
Copy link
Member

cho-m commented Sep 29, 2022

This is an upstream issue in cleo (python-poetry/cleo#247).

Upstream has mentioned they are working on getting out fix with v1.0 release: #109662 (comment)

@MarcelWilson
Copy link

I'm presuming that once the cleo fix releases we will need to run a brew upgrade for poetry and that will update the file?

As a temporary workaround I manually updated the /usr/local/etc/bash_completion.d/poetry file to include quotes around commands with two words.

Change (cache clear) to ("cache clear") on line 40, etc.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Oct 20, 2022
@LawnGnome
Copy link

This is still an issue as of the current 1.2.2.

(Not nagging; just noting in response to the stale bot action.)

@github-actions github-actions bot removed the stale No recent activity label Oct 20, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Nov 24, 2022
@jplindquist
Copy link

Looks like poetry 1.3.0 release (just now) should resolve this once it's updated in brew

@cho-m
Copy link
Member

cho-m commented Dec 11, 2022

Closing as new release merged in #117779

@cho-m cho-m closed this as completed Dec 11, 2022
@github-actions github-actions bot added the outdated PR was locked due to age label Jan 11, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

5 participants