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

Reset-PSKoan: Improve handling for missing topics #312

Merged
merged 3 commits into from
Oct 28, 2019

Conversation

vexx32
Copy link
Owner

@vexx32 vexx32 commented Oct 28, 2019

PR Summary

Added some handling to just add the missing topics with Update-PSKoan instead of emitting errors.
Error may still be emitted if the user gives a negative response to that ShouldProcess prompt.

Context

Resolves #311

Changes

  • Added additional ShouldProcess check to determined whether to throw the error. If user agrees to add the new topic, Update-PSKoan is called for that topic to restore the file. Otherwise, emit an error.

TODO

  • Add test(s) to ensure the functionality works as expected.

Checklist

  • Pull Request has a meaningful title.
  • Summarised changes.
  • Pull Request is ready to merge & is not WIP.
  • Added tests / only testable interactively.
    • Make sure you add a new test if old tests do not effectively test the code changed.
  • Added documentation / opened issue to track adding documentation at a later date.

@indented-automation could you look over this when you have a brief moment? 💖 😊

@vexx32 vexx32 added PR-Needs-Review 🔍 Let's take a closer look! Category-Module Pertaining to the module's functionality itself. Category-Tests ✅ Pertaining to tests for the module functions. labels Oct 28, 2019
@vexx32 vexx32 added this to In Progress in Module Features / Bugfixes Progress via automation Oct 28, 2019
When a topic is missing from the user's folder, just add it.
This avoids the necessity of using Update-PSKoan before Reset-PSKoan.
Better UX to be able to reset all in one step.

Added a ShouldProcess() prompt indicating that the topic will be added.
@vexx32 vexx32 force-pushed the Reset-PSKoan/FixMissingTopic branch from 74aa2bb to 9bea757 Compare October 28, 2019 15:33
@indented-automation
Copy link
Contributor

Looks good to me

@vexx32 vexx32 force-pushed the Reset-PSKoan/FixMissingTopic branch 2 times, most recently from 1019eae to f1e330b Compare October 28, 2019 17:03
@vexx32 vexx32 force-pushed the Reset-PSKoan/FixMissingTopic branch from f1e330b to 9337038 Compare October 28, 2019 17:09
@vexx32 vexx32 merged commit de4dc93 into master Oct 28, 2019
Module Features / Bugfixes Progress automation moved this from In Progress to Closed Oct 28, 2019
@vexx32 vexx32 deleted the Reset-PSKoan/FixMissingTopic branch October 28, 2019 17:17
@vexx32 vexx32 removed the PR-Needs-Review 🔍 Let's take a closer look! label Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Module Pertaining to the module's functionality itself. Category-Tests ✅ Pertaining to tests for the module functions.
Development

Successfully merging this pull request may close these issues.

Reset-PSKoan doesn't handle missing files
2 participants