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

rmlint.sh: "syntax error near unexpected token `}'" when there is nothing to do #230

Closed
alexbarton opened this issue Jun 5, 2017 · 3 comments
Assignees
Labels

Comments

@alexbarton
Copy link

When there are no files to delete, the generated shell script (-o sh:) is invalid:

303: …
304: process_lint() {
305: }
306: …

which results in the following error message:

/tmp/rmlint.sh: line 305: syntax error near unexpected token `}'
/tmp/rmlint.sh: line 305: `}                                              '

The empty function body isn't allowed here.

This could be solved by always include a no op like : or true into this function, regardless of other operations to perform, like this:

303: …
304: process_lint() {
305:         :
306: }
307: …
@sahib
Copy link
Owner

sahib commented Jun 6, 2017

Thanks for finding this. Should be also fixed as of 6bd739b.

@sahib sahib added the bug label Jun 6, 2017
@sahib sahib self-assigned this Jun 6, 2017
@alexbarton
Copy link
Author

Thanks for this super-fast fix, I'll give it a try!

@sahib
Copy link
Owner

sahib commented Jun 10, 2017

We reverted to a state before the process_lint function due to #236, so this issue can be closed.

@sahib sahib closed this as completed Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants