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

FIX: fix the incorrect parameter parsing #381

Conversation

zhixingchen0629
Copy link
Contributor

if i pass this params vector to launch process when the executor was nullptr:

        std::string executor;
        std::vector<std::string> params;
        params.push_back("powershell");
        params.push_back("-noprofile");
        params.push_back("-executionpolicy");
        params.push_back("bypass");
        params.push_back("-file");
        params.push_back(m_command);
        auto launcher = boost::process::v2::default_process_launcher();
        m_child = std::move(launcher(m_ioContext, ec, executor.c_str(), params, boost::process::v2::process_stdio{nullptr, m_wPipe, m_wPipe}));

The actual splicing command_line at the bottom level is:

"" powershell -noprofile -executionpolicy bypass -file c:aaa

"" It is superfluous, which cause create process error.

parameter splicing should take into account the situation where executor is empty

@klemens-morgenstern
Copy link
Collaborator

I am assuming that was fixed in develop already?

@zhixingchen0629
Copy link
Contributor Author

zhixingchen0629 commented Jul 8, 2024

assuming

sorry, my pr was wrong commit, please check my latest pr
#382

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

Successfully merging this pull request may close these issues.

2 participants