Skip to content

Force module import to pick up changes#118

Merged
devblackops merged 1 commit intoposhbotio:masterfrom
Tadas:fix/force-module-import
Sep 26, 2018
Merged

Force module import to pick up changes#118
devblackops merged 1 commit intoposhbotio:masterfrom
Tadas:fix/force-module-import

Conversation

@Tadas
Copy link
Copy Markdown
Contributor

@Tadas Tadas commented Sep 25, 2018

Should use -Force when importing plugin modules

Description

When using PoshBot in an interactive shell, the module remains loaded in the session even if a bot instance is stopped and later started. Plugin modules are imported into PoshBot's scope.

This means that after a plugin module has been imported once, subsequent calls to Import-Module will not do anything. If new plugin functions have been added PoshBot will not know about them after stopping and starting the instance.

Using -Force ensures that modules are always (re)loaded from disk.

Related Issue

#117

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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.

@devblackops devblackops self-assigned this Sep 26, 2018
@devblackops
Copy link
Copy Markdown
Member

Thanks @Tadas!

@devblackops devblackops merged commit e344daa into poshbotio:master Sep 26, 2018
@Tadas
Copy link
Copy Markdown
Contributor Author

Tadas commented Sep 26, 2018

Most welcome 👍

@Tadas Tadas deleted the fix/force-module-import branch September 26, 2018 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants