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

Function override causes build failure #200

Open
zbalkan opened this issue Mar 28, 2022 · 0 comments
Open

Function override causes build failure #200

zbalkan opened this issue Mar 28, 2022 · 0 comments

Comments

@zbalkan
Copy link

zbalkan commented Mar 28, 2022

The BuildTools.psm1 module of yours is defined in the build script.

Import-Module "$PSScriptRoot/Tools/BuildTools.psm1" -Force -ErrorAction Stop

Then BuildHelpers module is imported 3 lines later.

Import-Module BuildHelpers -Force -ErrorAction Stop

However they both have the same command, Publish-GithubRelease with different parameters. The first one, your custom module requires a parameter called GITHUB_ACCESS_TOKEN while the latter requires AccessToken as you can see here. And the second one is imported later with -Force parameter, it overrides the function from the first module. It is better to make a decision:

  • Keep both functions but move custom module a few lines below to override external one.
  • Remove Publish-GithubRelease from BuildTools.psm1 and use the one from BuildHelpers module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant