cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Removes trailing slashes from 'spo get'

Open milanholemans opened this issue 1 year ago • 2 comments

While using the CLI, I used spo set command. I just copied the tenant URL from my browser and noticed it has a trailing slash. While the API requests are still working, it doesn't look nice in the debug logs. I also enforced that the URL parameter is a string.

image

milanholemans avatar Mar 21 '24 22:03 milanholemans

We have this in a lot of other places as well:

image

Maybe something for another day.

martinlingstuyl avatar May 03 '24 12:05 martinlingstuyl

Good catch. We should definitely trim that

Adam-it avatar May 03 '24 16:05 Adam-it

@martinlingstuyl, I made a small update to this PR. In #5955 we introduced a new util function removeTrailingSlashes since this might come in handy at other places as well. So updated this PR to use that util function instead. I hope you don't mind.

milanholemans avatar May 07 '24 09:05 milanholemans

Merged manually, thank you! 🎉

martinlingstuyl avatar May 07 '24 14:05 martinlingstuyl