Closed Stephanevg closed 1 month ago
I face an issue, which was very 'combersome' for me to troubleshoot.
Ultimatley, it was all my fault, because I was declaring my base url as follows:
$pat = "CrazyPat123" $BaseUrl = "https://my.gitlabbaseurl.com/" $env:GITLAB_ACCESS_TOKEN = $Pat $env:GITLAB_URL = $BaseUrl
instead of
$pat = "CrazyPat123" $BaseUrl = "https://my.gitlabbaseurl.com" #notice the trailing '/' is not present anymore $env:GITLAB_ACCESS_TOKEN = $Pat $env:GITLAB_URL = $BaseUrl
Since -Verbose didn't work (see #96 ) It took me a bit of time to understand what was wrong.
We could potentially just add some logic to remove the trailing '/' if it is found on the $env:GITLAB_URL variable. Maybe in Set-DefaultGitlabSite ?
$env:GITLAB_URL
Or maybe add a function called Set-GitLabBaseUrl which would actually do that cleanup, before writing it to the $env:GITLAB_URL variable.
Set-GitLabBaseUrl
I would be happy to write the fix and add a PR, just let me know.
Fixed in https://github.com/chris-peterson/pwsh-gitlab/commit/cf2c57f9196bcc975753ef1b8664e0c26413d8bb
I face an issue, which was very 'combersome' for me to troubleshoot.
Ultimatley, it was all my fault, because I was declaring my base url as follows:
instead of
Since -Verbose didn't work (see #96 ) It took me a bit of time to understand what was wrong.
We could potentially just add some logic to remove the trailing '/' if it is found on the
$env:GITLAB_URL
variable. Maybe in Set-DefaultGitlabSite ?Or maybe add a function called
Set-GitLabBaseUrl
which would actually do that cleanup, before writing it to the$env:GITLAB_URL
variable.I would be happy to write the fix and add a PR, just let me know.