Fix rbt alias --dry-run with system command aliases.

Review Request #12194 — Created March 22, 2022 and submitted

Information

RBTools
release-3.x

Reviewers

When running rbt alias --dry-run on a system command alias (an alias
that executes a command, marked with a leading !), the result would be
a list of characters separated by spaces.

This was due to a bad assumption in the code where we assumed the value
we were working with was a list, each representing part of a command
invocation. These sorts of aliases were represented as a string, so we
ended up treating the string as a list of individual characters,
inserting spaces between each.

This change fixes this bug buy only attempting this normalization if
working with a list. Strings are printed as-is.

Tested with both types of aliases. Saw the expected results.

Tested the links in the new release notes.

Summary ID
Fix rbt alias --dry-run with system command aliases.
When running `rbt alias --dry-run` on a system command alias (an alias that executes a command, marked with a leading `!`), the result would be a list of characters separated by spaces. This was due to a bad assumption in the code where we assumed the value we were working with was a list, each representing part of a command invocation. These sorts of aliases were represented as a string, so we ended up treating the string as a list of individual characters, inserting spaces between each. This change fixes this bug buy only attempting this normalization if working with a list. Strings are printed as-is.
9efe5c19868139c17f01c48fd4a49a5c55ac310d
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.x (41970aa)
Loading...