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

Quotation marks are filtered out #71

Open
xuqiqiang opened this issue May 16, 2022 · 2 comments
Open

Quotation marks are filtered out #71

xuqiqiang opened this issue May 16, 2022 · 2 comments

Comments

@xuqiqiang
Copy link

I cannot run this command:
ffmpeg.exe -vf scale='min(250,iw)':-1 ...

@xuqiqiang xuqiqiang changed the title Colons are filtered out Quotation marks are filtered out May 16, 2022
@alextekartik
Copy link
Contributor

When there are ' or " in an argument, the solution is to wrap the argument with shellArgument as it will properly format the parameter:

import 'package:process_run/shell.dart';

void main(List<String> arguments) async {
  // Incorrect
  await run("echo scale='min(250,iw)':-1");
  // Correct
  await run('echo ${shellArgument("scale='min(250,iw)':-1")}');
}

should give:

$ echo scale=min(250,iw):-1
scale=min(250,iw):-1
$ echo "scale='min(250,iw)':-1"
scale='min(250,iw)':-1

@xuqiqiang
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants