aws-sso-util icon indicating copy to clipboard operation
aws-sso-util copied to clipboard

Documentation of `--safe-account-names` does not match implementation

Open mss opened this issue 5 months ago • 0 comments

The --help explains --safe-account-names as

In profiles, replace any character sequences in account names not in A-Za-z0-9-._ with a single -

The code replaces a different set of characters though:

def get_safe_account_name(name):
    return re.sub(r"[\s\[\]]+", "-", name).strip("-")

I don't know what the intended behaviour is since the regex looks like something which will generate a "safe" name whereas the description sounds like something which would generate a more "sensible" name (in my case I happen to have slashes in the account names).

mss avatar Sep 23 '24 09:09 mss