I have function in a module which returns a paths -
function PoshPath([string] $tag) { switch ($tag) { "sql" { return $psscriptroot+"\scripts\sql" } "private" { return $psscriptroot+"\scripts\private" } "public" { return $psscriptroot+"\scripts\public" } "sql" { return $psscriptroot+"\scripts\sql" } default { return $psscriptroot } } }
I am facing a peculier issue where in the return string of the function is been appended with space,
I realized the issue is nothing related to a function as in the second call to write-host I can see the space inserted between Hello and \*.ps1.
Why this extra space added and how can I get rid of this?
Thanks,
Shiju Samuel