silverhack/monkey365

[Bug]: Import-Module throw an exception

Closed this issue · 4 comments

What happened?
When calling Directory.EnumerateFiles and when a directory does not exist, an exception is raised. This happens when monkey365 is imported.

How to reproduce it
Steps to reproduce the behavior:

  1. What command are you running? Import-Module path/to/monkey365
  2. See error
    Screenshot 2024-01-09 194506

Expected behavior
Import module without errors and to control exceptions.

From where are you running Monkey365?
Please, complete the following information:

  • Resource: [Docker container, workstation) all
  • OS: [e.g. Windows, Linux, etc. ] all
  • PowerShell Version [$PsVersionTable]: all PowerShell versions
  • Monkey365 Version: latest
  • Others:

Additional context
A workaround is to check all paths with Directory.Exists.

Hi all,

This is now fixed on dev branch.

Cheers,

The issue is still relevant. Was it not pushed to the official download repo?

Hey @sssseossss,

I'm the only developer for this project and I have been very busy, but I'll try to get some spare time to update the code base with this and other improvements.

Cheers,

This is now updated in main release.

Cheers,