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

Missing or Undefined Custom Function 'Edit-LineEnding' in 'Invoke-PolicyToBicep.ps1' Script #678

Closed
2 tasks done
KeysAU opened this issue Nov 10, 2023 · 2 comments
Closed
2 tasks done

Comments

@KeysAU
Copy link

KeysAU commented Nov 10, 2023

What happened? Provide a clear and concise description of the bug, including deployment details.

When you execute the "Invoke-PolicyToBicep.ps1" script located at ".github\scripts\Invoke-PolicyToBicep.ps1," it attempts to use a custom function called "Edit-LineEnding."

However, this function is not present in the ".ps1" script itself. I've searched the repository, but I couldn't find any references to this function. Can you please clarify where this function is supposed to come from?

image

image

image

Please provide the correlation id associated with your error or bug.

No response

What was the expected outcome?

You can call function Update-FileLineEndingType without error.

Relevant log output

Edit-LineEnding: 
Line |
  49 |    (Get-Content $filePath | Edit-LineEnding -LineEnding $LineEnding) ||                             ~~~~~~~~~~~~~~~
     | The term 'Edit-LineEnding' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Check previous GitHub issues

  • I have searched the issues for this item and found no duplicate

Code of Conduct

  • I agree to follow this project's Code of Conduct
@oZakari
Copy link
Contributor

oZakari commented Nov 10, 2023

Hi @KeysAU, sorry for any confusion. This function is now included within the ALZ-PowerShell-Module. Once you go ahead and install that module, you should be able to call that function.

I'll go ahead and update these scripts and the script comments before closing this out.

@KeysAU
Copy link
Author

KeysAU commented Nov 13, 2023

ah brilliant, yep installed the module and all working.

Thank you!

@KeysAU KeysAU closed this as completed Nov 13, 2023
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

2 participants