Closed pommetjehorlepiep closed 3 years ago
Although installed, pure theme not recognized
rpi4% prompt -l
Currently available prompt themes:
adam1 adam2 bart bigfade clint default elite2 elite fade fire off oliver pws redhat restore suse walters zefram
In the past installing pure via npm as root hasn't been supported, however, with a recent change (#606) this was supposed to become possible, but it turns out the location of site-functions
is not as I expected on Debian/Ubuntu.
I'll create a PR for improving the folder detection in the installer later today, on your part this will probably require removing the /usr/share/zsh/site-functions
folder if it has been created by npm install (e.g. check the date).
In the past installing pure via npm as root hasn't been supported, however, with a recent change (#606) this was supposed to become possible, but it turns out the location of
site-functions
is not as I expected on Debian/Ubuntu.I'll create a PR for improving the folder detection in the installer later today, on your part this will probably require removing the
/usr/share/zsh/site-functions
folder if it has been created by npm install (e.g. check the date).
Excellent! Thx.
@pommetjehorlepiep didn't have time to create the PR before now, would you mind taking it for a spin (#611)? Checking out the repo/PR and running npm install
(as root, I suppose) should sufficiently simulate what happens during a regular install.
@pommetjehorlepiep didn't have time to create the PR before now, would you mind taking it for a spin (#611)? Checking out the repo/PR and running
npm install
(as root, I suppose) should sufficiently simulate what happens during a regular install.
Your change fixed the issue!
/usr/share/zsh/site-functions
(as suggested above)/bin/sh
to point to dash
again (which is the default shell out-of-the-box)root
: npm install --allow-root --unsafe-perm=true
(from within the git repo directory)Output:
rpi4# npm install --allow-root --unsafe-perm=true > pure-prompt@1.17.2 postinstall /tmp/pure > if [ -e /opt/homebrew/bin/zsh ]; then PURE_DEST=/opt/homebrew/share/zsh/site-functions npm run --silent postinstall-link && exit 0; elif [ -e /usr/local/bin/zsh ]; then PURE_DEST=/usr/local/share/zsh/site-functions npm run --silent postinstall-link && exit 0; elif [ -e /bin/zsh ] || [ -e /usr/bin/zsh ]; then for dest in /usr/share/zsh/site-functions /usr/local/share/zsh/site-functions; do if [ -d $dest ]; then PURE_DEST=$dest npm run --silent postinstall-link && exit 0; fi; done; fi; PURE_DEST="$PWD/functions" npm run --silent postinstall-link && npm run --silent postinstall-fail-instructions up to date in 5.484s found 0 vulnerabilities
prompt -l
now shows: ❯ prompt -l
Currently available prompt themes:
pure adam1 adam2 bart bigfade clint default elite2 elite fade fire off oliver pws redhat restore suse walters zefram
Thanks for all your help and the quick fix @mafredri!
General information
System report (output of
prompt_pure_system_report
):Other information
I have:
Problem description
npm install --global pure-prompt
npm ERR! A complete log of this run can be found in:
[sudo] password for ....:
sh: 1: [[: not found sh: 1: [[: not found sh: 1: [[: not found sh: 1: [[: not found glob error { [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] errno: -13, code: 'EACCES', syscall: 'scandir', path: '/root/.npm/_logs' } npm ERR! code ELIFECYCLE npm ERR! errno 243 npm ERR! pure-prompt@1.17.2 postinstall:
if [[ -e /opt/homebrew/bin/zsh ]]; then PURE_DEST=/opt/homebrew/share/zsh/site-functions npm run --silent postinstall-link && exit 0; elif [[ -e /usr/local/bin/zsh ]]; then PURE_DEST=/usr/local/share/zsh/site-functions npm run --silent postinstall-link && exit 0; elif [[ -e /bin/zsh ]] || [[ -e /usr/bin/zsh ]]; then PURE_DEST=/usr/share/zsh/site-functions npm run --silent postinstall-link && exit 0; fi; PURE_DEST="$PWD/functions" npm run --silent postinstall-link && npm run --silent postinstall-fail-instructions
npm ERR! Exit status 243 npm ERR! npm ERR! Failed at the pure-prompt@1.17.2 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
sudo npm install --global pure-prompt --allow-root --unsafe-perm=true
Reproduction steps
See above
My
.zshrc
: