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

(maint) Fixed service collection not being created on non-vcs commands #292

Merged
merged 1 commit into from
Nov 16, 2020
Merged

(maint) Fixed service collection not being created on non-vcs commands #292

merged 1 commit into from
Nov 16, 2020

Conversation

AdmiringWorm
Copy link
Member

Description

Due to the service collection only being set up when a VCS command is being used, an exception
is throw on non-vcs commands (like showconfig).

Related Issue

Related to closed issue #181

Motivation and Context

To be able to run non-vcs commands.

How Has This Been Tested?

Local debugging.

Screenshots (if appropriate):

image

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed. (There are several tests failing, not related to this PR).

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2020

Codecov Report

Merging #292 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #292   +/-   ##
========================================
  Coverage    78.36%   78.36%           
========================================
  Files           54       54           
  Lines         1137     1137           
  Branches       131      131           
========================================
  Hits           891      891           
  Misses         225      225           
  Partials        21       21           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f309aa...f7bdd82. Read the comment docs.

@AdmiringWorm
Copy link
Member Author

Odd, couldn't get all the unit tests to work locally. But they somehow works on appveyor (and I am not just talking about the integration tests).

.AddSingleton<IVcsProvider, GitHubProvider>()
.AddSingleton<IVcsService, VcsService>();

if (options is BaseVcsOptions vscOptions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (options is BaseVcsOptions vscOptions)
if (options is BaseVcsOptions vcsOptions)

Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor suggestion...

@codecov-io
Copy link

Codecov Report

Merging #292 (9a49316) into develop (64a820e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #292   +/-   ##
========================================
  Coverage    78.36%   78.36%           
========================================
  Files           54       54           
  Lines         1137     1137           
  Branches       131      131           
========================================
  Hits           891      891           
  Misses         225      225           
  Partials        21       21           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64a820e...9a49316. Read the comment docs.

Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 7651190 into GitTools:develop Nov 16, 2020
@gep13
Copy link
Member

gep13 commented Nov 16, 2020

@AdmiringWorm your changes have been merged, thanks for your contribution 👍

@AdmiringWorm AdmiringWorm deleted the exception-fix branch November 16, 2020 20:48
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.

4 participants