When using Add-Sample, the first question that is asked is "What is your source folder". When using PrivateFunction for the Sample parameter, the code suggests the full path of the local folder and adds Source behind it. When continuing, it then throws an exception mentioning it does not support an absolute path:
When you specify PublicFunction, it correctly suggest a relative path to the Source folder:
Problem description
When using Add-Sample, the first question that is asked is "What is your source folder". When using PrivateFunction for the Sample parameter, the code suggests the full path of the local folder and adds Source behind it. When continuing, it then throws an exception mentioning it does not support an absolute path:
When you specify PublicFunction, it correctly suggest a relative path to the Source folder:
Verbose logs
How to reproduce
Run
Add-Sample -Sample PrivateFunction -PrivateFunctionName Get-PrivateFunction
Expected behavior
Suggest a relative path when the code expects that.
Current behavior
The code suggests an absolute path
Suggested solution
Change the code to suggest a relative path, just like it does for PublicFunction
Operating system the target node is running
PowerShell version and build the target node is running
Module version used