-
Notifications
You must be signed in to change notification settings - Fork 296
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
[vcpkg-artifacts] Find git using vcpkg fetch git
.
#569
Conversation
I wrote this forwarder to what ce's documentation said: --registry to point to the registry. But that command on the ce side just accepts the first parameter as the path to the registry, so the mapping was wrong. Also moves handling of --debug into the common bits.
…ing messages to stderr rather than stdout. Note that error messages still go to stdout. Get the path to git by running `vcpkg fetch`
ae99184
to
95f1414
Compare
ce/ce/vcpkg.ts
Outdated
subproc.on('error', (err) => { reject(err); }); | ||
subproc.on('close', (code, signal) => { | ||
if (code === 0) { accept(result); } | ||
accept(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be
accept(undefined); | |
reject("vcpkg returned nonzero exit code: " + result) |
or just reject(result)
?
|
||
protected: | ||
MessageSink() = default; | ||
~MessageSink() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~MessageSink() = default; | |
virtual ~MessageSink() = default; |
Agreed nobody should ever be deleting it through the interface, but it seems good practice anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being protected
already gives it the right behavior here.
virtual void print(Color c, StringView sv) override { msg::write_unlocalized_text_to_stdout(c, sv); } | ||
}; | ||
|
||
StdOutMessageSink stdout_sink_instance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StdOutMessageSink stdout_sink_instance; | |
static StdOutMessageSink stdout_sink_instance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved by moving into an unnamed namespace. Ditto below.
virtual void print(Color c, StringView sv) override { msg::write_unlocalized_text_to_stderr(c, sv); } | ||
}; | ||
|
||
StdErrMessageSink stderr_sink_instance; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StdErrMessageSink stderr_sink_instance; | |
static StdErrMessageSink stderr_sink_instance; |
--x-from-script
tofetch
to make some attempt to make stdout only the resulting path so that scripts can embed fetching paths:VCPKG_COMMAND
to find a vcpkg to launch, and to callvcpkg fetch git
to get git's path.