Description: We should be able to specify number as option value without the need to enclose it in quotes.
Steps to reproduce:
λ o365 spo storageentity set -u https://xxx.sharepoint.com/sites/apps -k velin1 -v 1
Expected:
// empty line. Command executed successfully
Actual:
Error: s.replace is not a function
Additional notes:
Seems that the option value -v 1 is problem for Utils.escapeXml because actually is number.
Quick look at the Utils.escapeXml method shows that if we turn the var 's' to string, could resolve the ask.
// change
return s.replace(/[<>&"]/g, (c: string): string => {
// to
return s.toString().replace(/[<>&"]/g, (c: string): string => {
Description: We should be able to specify number as option value without the need to enclose it in quotes.
Steps to reproduce:
λ o365 spo storageentity set -u https://xxx.sharepoint.com/sites/apps -k velin1 -v 1Expected:
Actual:
Additional notes:
Seems that the option value
-v 1is problem forUtils.escapeXmlbecause actually is number.Quick look at the Utils.escapeXml method shows that if we turn the var 's' to string, could resolve the ask.