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 edit command. #1221

Merged
merged 5 commits into from
Oct 6, 2023
Merged

Fix edit command. #1221

merged 5 commits into from
Oct 6, 2023

Conversation

BillyONeal
Copy link
Member

Fix edit command I broke in 81c8bed

PROC_THREAD_ATTRIBUTE_HANDLE_LIST rejects a list of length 0. Instead, just pass false to bInheritHandles in the CreateProcess call.

PROC_THREAD_ATTRIBUTE_HANDLE_LIST rejects a list of length 0. Instead, just pass false to bInheritHandles in the CreateProcess call.
@ras0219-msft
Copy link
Contributor

Can we end-to-end test this by setting EDITOR to something innocuous like echo?

@BillyONeal
Copy link
Member Author

Can we end-to-end test this by setting EDITOR to something innocuous like echo?

That won't work because the console of the editor isn't connected to the launching console. I suppose we could write a program whose job in life is to write a sentinel file or something.

@BillyONeal
Copy link
Member Author

Can we end-to-end test this by setting EDITOR to something innocuous like echo?

No, this path is only used for VS Code:

#if defined(_WIN32)
        auto editor_exe = env_editor.filename();
        if (editor_exe == "Code.exe" || editor_exe == "Code - Insiders.exe")
        {
            // note that we are invoking cmd silently but Code.exe is relaunched from there
            cmd_execute_background(Command("cmd").string_arg("/d").string_arg("/c").raw_arg(
                Strings::concat('"', cmd_line.command_line(), R"( <NUL")")));
            Checks::exit_success(VCPKG_LINE_INFO);
        }
#endif // ^^^ _WIN32

@BillyONeal BillyONeal merged commit 9601b79 into microsoft:main Oct 6, 2023
@BillyONeal BillyONeal deleted the fix-edit branch October 6, 2023 03:22
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.

3 participants