Commit 9edab5d
authored
🩹 [Patch]: Improve module installation logic (#78)
## Description
This pull request includes updates to the `scripts/main.ps1` file to
improve the installation and logging process for PowerShell modules.
Logging improvements:
* Added a log message before attempting to install each module to
provide better visibility into the installation process.
* Enhanced error messages to include the module name, making it easier
to identify which module's installation failed.
* Added a retry log message to indicate when the script is waiting
before retrying the installation.
Installation process improvements:
* Changed the `Install-PSResource` command to use `WarningAction
SilentlyContinue` and specify the repository as `PSGallery` to handle
warnings more gracefully and ensure the correct repository is used.
* Added a command to import each module after installation to ensure the
modules are available for use immediately.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] 1 parent 15e5c40 commit 9edab5d
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
0 commit comments