Skip to content
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

False "Recursive loop..." error #593

Closed
phoenix-violeus opened this issue Jul 2, 2020 · 3 comments
Closed

False "Recursive loop..." error #593

phoenix-violeus opened this issue Jul 2, 2020 · 3 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@phoenix-violeus
Copy link

Issue summary

When printing (echo/less) via server-side invocation, output that mirrors that of the previous command throws an error:
Recursive loop in echo detected, skip

Expected behavior

Output should print error-free after both submissions

Actual behavior

The second submission prints only an error message

Steps to reproduce

Client-side:

$(function() {
    $('body').terminal(function(command) {
        return $.post('script.php', {command: command});
    }, {
        invokeMethods: true
    });
});

Server-side (script.php):

<?php
echo '[[ terminal::less("Testing...") ]]';
@jcubic
Copy link
Owner

jcubic commented Jul 2, 2020

Those recursive guard is pretty flaky, maye I should remove it, and if it create recursive loop, it will be user problem. Will check if I can fix this without removing this check and if not I will just remove it.

Thanks for the report.

@jcubic jcubic added the Bug label Jul 2, 2020
@phoenix-violeus
Copy link
Author

No problem and thanks for the terminal!

jcubic added a commit that referenced this issue Jul 4, 2020
Now after each command prev exec is reset so it can detect actual recursive echo call
@jcubic
Copy link
Owner

jcubic commented Jul 4, 2020

The issue is fixed, it should never give false positives when detecting recursive calls.

@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Jul 4, 2020
@jcubic jcubic closed this as completed Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

2 participants