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

[Feature] unquoted list of files #54

Closed
s0undt3ch opened this issue Dec 2, 2020 · 4 comments · Fixed by #58
Closed

[Feature] unquoted list of files #54

s0undt3ch opened this issue Dec 2, 2020 · 4 comments · Fixed by #58
Labels
enhancement New feature or request

Comments

@s0undt3ch
Copy link

Would it be possible to add the possibility to have the list of files, shell escaped, but unquoted?

@dorny
Copy link
Owner

dorny commented Dec 3, 2020

Yes, should be doable. I just have to double-check escaping rules to ensure correct behavior. I will look into it in few days.

@s0undt3ch
Copy link
Author

s0undt3ch commented Dec 3, 2020

I managed to get what I needed by using

${{ join(fromJSON(your-action-json-output), ' ') }}

So maybe a FAQ or example is all that is needed.

@dorny
Copy link
Owner

dorny commented Dec 5, 2020

Glad to see you found a solution that works for you.

For most cases this should be fine, however there is no shell escaping applied so some obscure file name could break one's pipeline. After very quick research it looks that it should be safe to backslash escape everything except [a-zA-Z0-9_/.]. It should keep normal filenames without any change while still behave correctly in all cases. I will keep it on my todolist.

By the way, I'm quite curious. Why do you need shell escaped, but without quotes?

@dorny dorny added the enhancement New feature or request label Dec 5, 2020
@s0undt3ch
Copy link
Author

I'm feeding those files to another tool, pre-commit, which is not expecting them to be quoted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants