-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue after upgrading prompt #86
Comments
@dmccaffery this is the install output that Ross had shared with me. It looks to me like the platform install script wasn't called which would set the completions, git prompt, etc based on the lack of prompt arrow after attempting to install. Also I suggested trying the prompt: using bash shell
prompt: a new version of prompt is available: a95f87e6bdba2404804fb3ba30396805c1b41102
- run the update-prompt command line tool to upgrade
-bash: /Users/ross/.am/prompt/bash/completions/*: No such file or directory
-bash: __posh_git_ps1: command not found
am-mbp-142:~ ross$ update-prompt
prompt: establishing sudo (you may be prompted for credentials)...
Password:
prompt-install: creating backup path: /Users/ross/.am/backup/prompt/20210114_113908
prompt-install: backing up bash_profile
prompt-install: backing up bashrc
prompt-install: backing up profile
prompt-install: backing up zprofile
prompt-install: backing up zshrc
prompt-install: backing up /Users/ross/.am/prompt
prompt-install: removing /Users/ross/.am/prompt
prompt-install: creating /Users/ross/.am/prompt
prompt-install: installing promptMastermind to /Users/ross/.am/prompt
prompt-install: installing platform prerequisites (darwin.sh)
##############################################################################
INSTALLING VIA HOMEBREW FOR INTEL MACS
##############################################################################
installing homebrew...
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> /usr/bin/sudo /usr/sbin/chown ross:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at e989a0fb0 Merge pull request #10327 from MikeMcQuaid/keg-fix-alias-handling
Updated 2 taps (homebrew/core and homebrew/services).
==> Installation successful!
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
HOMEBREW_VERSION: 2.7.4-17-ge989a0f
ORIGIN: https://github.com/Homebrew/brew
HEAD: e989a0fb011e0f2f8b61cd195c4703c71a4b4b7f
Last commit: 3 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 20f54d5c5f560836d4a39dbafb21a0a1f30ab44e
Core tap last commit: 15 seconds ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.u7evAZXDp9/org.macosforge.xquartz:0
HOMEBREW_EDITOR: code --wait
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 11.0 build 1100
Git: 2.30.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.15.7-x86_64
CLT: 11.0.33.12
Xcode: 12.3
XQuartz: 2.7.11 => /opt/X11
updating homebrew...
Already up-to-date.
upgrading: openssl...
upgrading: git...
To relink:
brew unlink git && brew link git
upgrading: go...
To relink:
brew unlink go && brew link go
upgrading: nvm...
To relink:
brew unlink nvm && brew link nvm
upgrading: python...
To relink:
brew unlink [email protected] && brew link [email protected]
upgrading: gpg...
To relink:
brew unlink gnupg && brew link gnupg
upgrading: pinentry-mac...
To relink:
brew unlink pinentry-mac && brew link pinentry-mac
setting up nvm...
Installing latest LTS version.
Now using node v14.15.4 (npm v6.14.10)
setting git credential helper to use the macOS keychain
prompt-install: downloading better git-prompt
upgrading: bash...
To relink:
brew unlink bash && brew link bash
upgrading: bash-completion...
To relink:
brew unlink bash-completion && brew link bash-completion
##############################################################################
##############################################################################
# $SHELL will be /usr/local/bin/bash
PLEASE RUN: exec -l $SHELL
##############################################################################
##############################################################################
open-url: opening https://github.com/automotivemastermind/prompt/blob/v8.2.0/CHANGELOG.md via open...
-bash: __posh_git_ps1: command not found
am-mbp-142:~ ross$ exec -l $SHELL
prompt: using bash shell
prompt: a new version of prompt is available: a95f87e6bdba2404804fb3ba30396805c1b41102
- run the update-prompt command line tool to upgrade
bash: /Users/ross/.am/prompt/bash/completions/*: No such file or directory
bash: __posh_git_ps1: command not found
am-mbp-142:~ ross$ |
Please restore the latest backup from: ~/.am/backup/prompt This is the fastest way to unblock. There seems to be issues with hitting the GitHub API too often without being authenticated. Homebrew hits GitHub quite a bit as well, but prompt (even install) should not be hitting the api that hard. I suspect something else on your system is hitting the GitHub API and you're bumping up against the anonymous limits. Couple of things to try after restoring the backup:
GITHUB_TOKEN=${GITHUB_TOKEN} update-prompt Let me know how you make out. Happy to jump on a call if the issue persists. |
I should note, based on the output you shared, the installer worked as expected. It called the platform install (darwin) and also installed "better git prompt" which is where the function for posh_git_ps1 comes from -- more likely, there is an issue where the better git prompt script isn't being evaluated. I'll see if I can reproduce. |
Hey @dmccaffery, |
Alright so this is what I did ->
this still had the issue
but doing step 1 seemed to make it so prompt worked so I will do step 1 again until y'all have more steps for me to try :) |
FWIW, I ran into all the same behaviors as Ross minus the github SHA issue. |
github-token is a prompt command that makes the token available to prompt, homebrew, terraform, etc. I'll take a look. This must be a bash specific issue; I've been running zsh for well over a year now (it's the default on macOS these days). Will follow up with any findings. Apologies for the issues! |
@jeffreypmoran @Frostymnl @patrickserrano Is this still a problem? |
@sjk07 @patrickserrano FWIW, I ran into this issue again today when setting up a fresh machine. |
@jeffreypmoran -- I will work on this tonight |
@jeffreypmoran when you were setting up a fresh machine did you specify @dmccaffery can you clarify if running |
@patrickserrano I specified bash when installing |
@dmccaffery have you had a chance to look into this issue yet? |
I know what the issue is; just have not had a chance to fix. I'll work on it this weekend. You should be able to switch between zsh and bash, or configure either or regardless of the terminal shell being used (including dash, ash, ksh, fish, etc). We have tests to validate this; but they were broken in that previous [wip] that got merged. The new shell should be dramatically faster as it no longer relies on shell interpreters for the prompt itself; this was [wip] as there were things I was working out to fully support arm64 (Apple M1 as well as Linux on arm). Some PRs of mine that were pending in the upstream starship project (that I finally got through) were required as well. I'll get it fully ironed out over the weekend. |
After updating my prompt I get the folowing output when my terminal starts ->
The
-bash: __posh_git_ps1: command not found
appears after running any command in prompt.I also receive a
prompt: cannot retrieve SHA of latest version. Are you connected to the internet?
quite a bit even though I am connected to the internet.macOS Catalina Version 10.15.7
The text was updated successfully, but these errors were encountered: