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 request: running several commands with one macro #7

Open
matklad opened this issue Jul 30, 2018 · 2 comments
Open

Feature request: running several commands with one macro #7

matklad opened this issue Jul 30, 2018 · 2 comments

Comments

@matklad
Copy link

matklad commented Jul 30, 2018

Hi!

I need to run several commands in a row. Now, I do it like this:

fn install_code_extension() -> Result<()> {
    execute!(r"
cd code
npm install
    ")?;
    execute!(r"
cd code
./node_modules/vsce/out/vsce package
    ")?;
    execute!(r"
cd code
code --install-extension ./libsyntax-rust-0.0.1.vsix
    ")?;
    Ok(())
}

It would be really sweat if I was able to just

    execute!(r"
cd code
npm install
./node_modules/vsce/out/vsce package
code --install-extension ./libsyntax-rust-0.0.1.vsix
    ")?;
@cgwalters
Copy link

I think this is mostly addressed by sh_execute!() right? Or do you specifically want to avoid a shell?

@matklad
Copy link
Author

matklad commented Mar 30, 2020

Yeah, the original motivation was to avoid the shell (as this thing needs to be cross-platform), but I've switched to this monstrosity since.

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