From 9350afdab8d7d0c836371fd3e0f0eaf66d0b2ddc Mon Sep 17 00:00:00 2001 From: Thomas Nieto <38873752+ThomasNieto@users.noreply.github.com> Date: Mon, 7 Oct 2024 19:24:06 -0500 Subject: [PATCH] Fix formatting --- CHANGELOG.md | 7 +++++-- README.md | 9 +++++---- src/AnyPackage.ModuleFast.psm1 | 18 ++++++------------ 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e79e08..0cd52f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +The format is based on [Keep a Changelog][keep-a-changelog], +and this project adheres to [Semantic Versioning][semver]. + +[keep-a-changelog]: https://keepachangelog.com/en/1.0.0/ +[semver]: https://semver.org/spec/v2.0.0.html ## [Unreleased] diff --git a/README.md b/README.md index 6c33177..4bf69ae 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,17 @@ # AnyPackage.ModuleFast -AnyPackage.ModuleFast is an AnyPackage provider that facilitates installing PowerShell modules and their dependencies quickly. +AnyPackage.ModuleFast is an AnyPackage provider that facilitates installing +PowerShell modules and their dependencies quickly. ## Install AnyPackage.ModuleFast -```PowerShell +```powershell Install-PSResource AnyPackage.ModuleFast ``` ## Import AnyPackage.ModuleFast -```PowerShell +```powershell Import-Module AnyPackage.ModuleFast ``` @@ -18,7 +19,7 @@ Import-Module AnyPackage.ModuleFast ### Install a package -```PowerShell +```powershell Install-Package Az ``` diff --git a/src/AnyPackage.ModuleFast.psm1 b/src/AnyPackage.ModuleFast.psm1 index 2f82082..dab6248 100644 --- a/src/AnyPackage.ModuleFast.psm1 +++ b/src/AnyPackage.ModuleFast.psm1 @@ -96,23 +96,17 @@ class ModuleFastProvider : PackageProvider, IFindPackage, IInstallPackage { if ($spec.Contains('>=')) { return $spec.Split('>=')[0] - } - elseif ($spec.Contains('<=')) { + } elseif ($spec.Contains('<=')) { return $spec.Split('<=')[0] - } - elseif ($spec.Contains('=')) { + } elseif ($spec.Contains('=')) { return $spec.Split('=')[0] - } - elseif ($spec.Contains(':')) { + } elseif ($spec.Contains(':')) { return $spec.Split(':')[0] - } - elseif ($spec.Contains('<')) { + } elseif ($spec.Contains('<')) { return $spec.Split('<')[0] - } - elseif ($spec.Contains('>')) { + } elseif ($spec.Contains('>')) { return $spec.Split('>')[0] - } - else { + } else { return $spec } }