Skip to content

Regression >=0.10: Behavior with empty string #63

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

Closed
akiradeveloper opened this issue May 3, 2024 · 1 comment
Closed

Regression >=0.10: Behavior with empty string #63

akiradeveloper opened this issue May 3, 2024 · 1 comment

Comments

@akiradeveloper
Copy link

This code panics with "No such file or directory" with version 0.10 or above.

use cmd_lib::*;
fn main() {
    dbg!(run_cmd!(ls));
    let options = "";
    dbg!(run_cmd!(ls $options));
}

I think ls "" should be interpreted as ls in this library.

Is this your intention? and is there some workaround?

@akiradeveloper akiradeveloper changed the title Regression >0.10: Behavior with empty string Regression >=0.10: Behavior with empty string May 3, 2024
@tao-guo tao-guo closed this as completed in 6572e89 May 4, 2024
@rust-shell-script
Copy link
Owner

Thanks for reporting this. Yeah, it is better to skip the empty arguments.

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