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

nested cd does not work #50

Closed
ikey4u opened this issue Jun 6, 2022 · 0 comments
Closed

nested cd does not work #50

ikey4u opened this issue Jun 6, 2022 · 0 comments

Comments

@ikey4u
Copy link

ikey4u commented Jun 6, 2022

This is the minimal example to reproduce the problmen

Cargo.toml

[dependencies]
cmd_lib = "1.3"

main.rs

use cmd_lib::run_cmd;
fn main() {
    run_cmd! {
        mkdir -p build;
        cd build;
        mkdir -p nested;
        cd nested;
    }.unwrap();
}

Run the above code gives the followin error

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "Running [\"cd\", \"nested\"] failed: cd nested: No such file or directory" }', src/main.rs:8:7
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
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

1 participant