Atom-beautify: Could not beautify bash / Could not find 'beautysh'.

Created on 23 Feb 2017  ·  15Comments  ·  Source: Glavin001/atom-beautify

Description

Trying to beautify bash and I'm getting the error Could not find 'beautysh'. Do I have to install beautysh manually? This is not at all clear and https://github.com/bemeurer/beautysh does not have easy to follow install details. Additionally installing an extra tool manually is not consistent with other languages (I installed Atom beautify and it just worked).

Steps to Reproduce

  1. Add bash code to Atom editor
  2. Run command Atom Beautify: Beautify Editor

Checklist

I have:

  • [x] Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • [x] Reloaded (or restarted) Atom to ensure it is not a caching issue
  • [x] Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • [x] Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • [x] Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue: https://gist.github.com/bbodenmiller/415e1987bde6dcbd868410fa2b176a15
question

All 15 comments

Just to rule out a missing dependency could you try this command and let us know if it works:

apm install atom-beautify

Just ran and restarted Atom, no luck same error. Running Windows 10.

Just added censored version of debug.md.

+1

did you fix it?

You have to install beautysh manually.

  1. Download Python if not already installed. (https://www.python.org/downloads/release/python-361/)
  2. Open Command-Prompt
  3. run "pip install beautysh"
  4. Restart Atom

Now it should work.

Additionally installing an extra tool manually is not consistent with other languages (I installed Atom beautify and it just worked).

Beautysh is an external beautifier. While I try to find Node.js beautifiers which require no additional installation, this is no always possible. You options are installing this external beautifier or having no support for this language, whatsoever. 😉

@khuesgen 's instructions look good. If you need additional help I recommend contacting the maintainer over at https://github.com/bemeurer/beautysh

Can we get this more clearly documented in Atom beautify? At this point it's unclear which languages need a separate tool installation.

Always looking for ways to improve!

Currently an error message is displayed: https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/beautifier.coffee#L212-L250

And the language support has links for each of the beautifiers: https://github.com/Glavin001/atom-beautify#language-support

How about adding another table to README with beautifiers and a ✅ or ❌ for whether or not they require additional installation? Any other suggestions?

Love that idea. I'll also run through the error message and see if I have any suggestions on that.

I added a new table to the README: https://github.com/Glavin001/atom-beautify#beautifiers

Does this help?

Yes, thanks! I think you could even make it simpler if you wanted to:

  • Only list ones not preinstalled
  • Unless one of them's instructions is not "Go to x and follow the instructions." you could just link to repo and at the top say "... Other beautifiers, however, are command-line interface (CLI) applications and require you to manually install them using the instructions in on the beautifiers GitHub repo." or similar
  • I have mixed feelings on if Beautifiers or Language Support should be listed first. If language is first I'd add a note somewhere that some beautifiers require manual install.

Instructions for Windows needs to include adding path to C:\Python27\Scripts to system variables.

To fix this issue on macOS 10.13.6 -- Atom 1.29.0, I had to apply the atom-beautify 0.33.0. Then ran these commands:
brew install python
cd /usr/local/bin
git clone https://github.com/bemeurer/beautysh
cd beautysh
python setup.py install

Then I was good to go after restarting Atom.

Thanks @yoopersteeze. You shouldn't have to install python through Brew, it comes preinstalled. Or was there a specific reason why?

@szeck87 i was getting python errors so I just nuked it and re-installed

Was this page helpful?
0 / 5 - 0 ratings