-
Notifications
You must be signed in to change notification settings - Fork 13
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
ERROR: invalid option: --indent #13
Comments
Please let me know what version of sass and sass-convert you're using. |
Can you also run this from the cli and let me know the output?
|
Sure, I am using sass version 3.2.10. The output for test is: .test {
color: red;
} |
That doesn't make sense to me. This plugin is simply a wrapper around sass-convert. If you can run sass-convert from the CLI you should be able to run it from this plugin.
Thanks. |
|
I'm almost out of ideas on this one. Do you get this error for every file you try to beautify? Can you please try the following: Before beautifying, can you open up the Sublime Text console: View >> Show Console Thanks. |
(1) Do you get this error for every file you try to beautify? Yes, and I have tried both scss and sass files. (2) Console Log: error: There was an error beautifying your Sass: |
Ok, we're going to have to break it down. Can you paste this into the console in sublime text and let me know the output? import os;import subprocess;process=subprocess.Popen(['sass-convert','--unix-newlines','--stdin','--indent', '4','--to', 'scss'],env=os.environ.copy(),stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE);output,err=process.communicate(input=".test{color:red}".encode('utf-8'));output=output.decode('utf-8');err=err.decode('utf-8');print(output);print(err); |
The console output from your string was: If I remove --indent 4 from your string I receive this out put:
This got me thinking and so I tried to run I hope this helps. Thank you for taking the time to look into this. |
Man this is really weird, I just can't replicate what you're seeing. It's quite frustrating. Thanks for holding out with me. At this stage, we only know this much:
The above points suggest a different version of sass-convert is being used when run from sublime text.
|
|
When typing |
Sure, it looks as though terminal is referencing the gem location. |
I checked my /usr/bin/ and the version of sass was from last 2012. I reinstalled sass (which sass-convert now points to /usr/bin/) and now SassBeautify is working like a charm. Not sure why it was referencing the gem location. Great support, thank you for helping me out with this. |
Ahhh, RVM!! Yea RVM will change your PATH which is why a different sass version was being used in SassBeautify. This has caused issues for others as well, which is why I added a custom path option to this plugin. If you want to continue to use RVM, you can try add the RVM sass bin folder path to the SassBeautify settings. (There's probably a more elegant solution, but I haven't figured it out yet as I'm not entirely familiar with RVM.) I'm just glad we got there in the end! 👍 |
Hello I am having problems with this same error. I try to edit the file SassBeautify.sublime-settings with the new path /usr/bin/ and I didn't have lucky. I also reinstalled sass and also I am using RVM. Any help please! I have big sass files.... |
@Estlopacu Type the following into terminal and let me know the output: |
This /Users/estebanlopez/.rvm/gems/ruby-1.9.3-p429/bin/sass-convert |
If you add |
@Estlopacu Actually adding that path will probably not work. I've reopened issue #1 and am working on a proper fix for this. |
I think we can finally put this one to bed: https://github.com/badsyntax/SassBeautify#compatibility-with-rvm Upgrade to the latest version (which includes a PATH fix):
|
It works perfect! Thanks for you help. Pura vida!! as we say in my country Costa Rica. |
Very happy to hear, thank you :) RVM has caused me many headaches and I'm glad to finally figure out how it modifies the environment settings. |
Hello,
When ever I try to run SassBeautify in ST2 or ST3 I receive the following error:
There was an error beautifying your Sass:
OptionParser::InvalidOption:
invalid option: --indent
Ay help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: