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

Update Button.ps1 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

deanwest
Copy link

When I run the button command I get the following error "Cannot find path 'C:\Users\dean.west\Documents\PowerShell\Modules\MsftTeams\1.0.0\public\internal\ButtonJsonTemplate.psd1' because it does not exist."

Looking at the repo internal should be private and when I run $PSScriptRoot. It automatically defined the fully-qualified filesystem path to the directory that contains the button script file. C:\Users\dean.west\Documents\PowerShell\Modules\MsftTeams\1.0.0\public

I am a novice and added the code I know fixes the issue but I do not know if it's the most efficient way to get the path.

When I run the button command I get the following error "Cannot find path 'C:\Users\dean.west\Documents\PowerShell\Modules\MsftTeams\1.0.0\public\internal\ButtonJsonTemplate.psd1' because it does not exist."

Looking at the repo internal should be private and when I run $PSScriptRoot. It automatically defined the fully-qualified filesystem path to the directory that contains the button script file. C:\Users\dean.west\Documents\PowerShell\Modules\MsftTeams\1.0.0\public

I am a novice and added the code I know fixes the issue but I do not know if it's the most efficient way to get the path.
Comment on lines +57 to +58
$scriptPath = split-path -parent $PSScriptRoot
$buttonhash = Import-PowerShellDataFile $scriptPath\private\ButtonJsonTemplate.psd1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I must have renamed the folder from internal to private before publishing to the gallery so just changing from internal to private should be enough to fix the issue.

Suggested change
$scriptPath = split-path -parent $PSScriptRoot
$buttonhash = Import-PowerShellDataFile $scriptPath\private\ButtonJsonTemplate.psd1
$buttonhash = Import-PowerShelldataFile $PSScriptRoot\Private\ButtonJsonTemplate.psd1

I will have to verify if this is the case though.

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

Successfully merging this pull request may close these issues.

2 participants