Skip to content

Update cmd_lib #2

Closed
Closed

Description

@akiradeveloper
No description provided.

Activity

  1. akiradeveloper commented on May 1, 2024

    @akiradeveloper
    CollaboratorAuthor

    Using cmd_lib=1.9 panics the mount with options="".

    fn mount(s: &impl Stack, options: &str) -> String {
        let blk_dev = s.path();
        let mp = format!("/tmp/{}", rand_name());
        run_cmd!(rm -rf $mp).unwrap();
        run_cmd!(mkdir -p $mp).unwrap();
        run_cmd!(mount $options $blk_dev $mp).unwrap();

    To narrow the problem, I wrote a small reproducer.

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

    Conclusion:

    • 0.9 doesn't panic.
    • 0.10 or greater panics.
  2. akiradeveloper commented on May 4, 2024

    @akiradeveloper
    CollaboratorAuthor

    For now, I updated cmd_lib to 0.9.

  3. akiradeveloper commented on May 5, 2024

    @akiradeveloper
    CollaboratorAuthor

    I think it is now fixed in the latest. rust-shell-script/rust_cmd_lib@6572e89

    Once released, I will finish this task.

  4. linked a pull request that will close this issueBump cmd_lib to 2.0.1 #7on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions