-
Notifications
You must be signed in to change notification settings - Fork 453
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
ENOENT -4058 when beautifying php #51
Comments
Could you show what your editor's source code is? (which is the input text to the PHP beautifier) If an error occurred in the beautification process of your PHP source code, the output file may not have been created and therefore when the call to delete temporary output file was executed it was unnecessary (there is no existing output file since an error had occurred) and it errored again because it was attempting to delete a file that does not exist. |
Please paste your source code so I can quickly test later without having to retype and possibly mistype your code. Thank you for posting version numbers @BOOMER74 |
So I am using: <?php
function add($a, $b) {
return $a +$b; }
echo add(1,2); and it beautifies correctly. I will add a little more logging in the Console that you can send me to debug. |
v0.4.4 is the version with additional logging. Let me know how that goes. |
Log this: Beautifcation Error: Error {killed: false, code: 1, signal: null} |
Hey, sorry I didn't respond to this sooner. Only recently got atom installed and running again, it appears that the initial error I was having no longer occurs but I'm running into a new one now regardless. Using various code examples, and for consistencies sake, the one posted above too, I'm getting the following error:
No idea why that would be happening. |
Glad to hear the previous error is no longer persisting, @AndalfTheBeard. That new error looks like the result of the beautification is |
Atom Version 0.121.0 running Xubuntu 14.04 LTS I've tried various code samples, all resulted in the same error. <?php
function add($a, $b) {
return $a +$b; }
echo add(1,2); included, as it was the example you provided above. |
My beautification is working properly. Before<?php
function add($a, $b) {
return $a +$b; }
echo add(1,2); After:<?php
function add($a, $b) {
return $a + $b;
}
echo add(1, 2); This (and even the previous error you and @BOOMER74 are experiencing) could be caused by an incorrect Could you retrieve the $ which php_beautifier
/Users/glavin/pear/bin/php_beautifier And set your I have put in some special code as a workaround for Node.js's issue with the However, it may not be working in you cases. So by forcing the |
|
@Glavin001 I have install |
@AndalfTheBeard could you confirm if that was your issue as well? |
having purged php5, php5-cli and php-pear then reinstalling, along with running
I am still unable to get this to work. cmd: "/bin/sh -c [ -f ~/.bash_profile ] && source ~/.bash_profile;[ -f ~/.bash_rc ] && source ~/.bash_rc;php "~/pear/bin/php_beautifier" "/tmp/input114713-3313-1uewpzf" "/tmp/114713-3313-iifrnm""
code: 1
killed: false
message: "Command failed: /bin/sh -c [ -f ~/.bash_profile ] && source ~/.bash_profile;[ -f ~/.bash_rc ] && source ~/.bash_rc;php "~/pear/bin/php_beautifier" "/tmp/input114713-3313-1uewpzf" "/tmp/114713-3313-iifrnm"↵"
signal: null
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
__proto__: d I have no idea what is happening here. trying to use |
To execute a command, even when in the same directory, you should prefix you command with If you can get php_beautifer to work with the above, then we know it is correctly installed. Instead of using the Besides that, you generated command from atom beautify looks correct. You should test your source code with |
|
Not quite sure why you insist on using the long option It should be: |
|
At least we can now guarantee we are using it as expected. Sounds like your installation of php_beauifier is broken. This is a php_beautifier issue and you can follow up with them (or do some independent research) and see if they have any experience with this issue. |
I am closing this as it appears resolved from an Atom Beautify perspective. Looks like it was a php_beautifier installation issue. / wrong pear path as @BOOMER74 mentioned. |
Ok, if you have this problem try this:
|
Can confirm it was a bad install of PHP_Beautifier, not sure how but I managed to fix it. Thanks for the help. |
Glad to hear it's working out for everyone. Good to have this discussion available for other Atom Beautify and PHP_Beautifier users. Thanks guys! |
As seen below:
http://prntscr.com/461gkr
The text was updated successfully, but these errors were encountered: