Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty expanded value for duplicate key #260

Merged
merged 1 commit into from Jul 16, 2020

Commits on Jul 3, 2020

  1. Fix empty expanded value for duplicate key

    Example problematic file:
    
    ```bash
    hello=hi
    greetings=${hello}
    goodbye=bye
    greetings=${goodbye}
    ```
    
    It would result in `greetings` being associated with the empty string
    instead of `"bye"`.
    
    The problem came from the fact that bindings were converted to a dict,
    and so deduplicated by key, before being interpolated.  The dict would
    be `{"hello": "hi", "greetings": "${goodbye}", "goodbye": "bye"}` in the
    earlier example, which shows why interpolation wouldn't work: `goodbye`
    would not be defined when `greetings` was interpolated.
    
    This commit fixes that by passing all values in order, even if there are
    duplicated keys.
    bbc2 committed Jul 3, 2020
    Copy the full SHA
    8ffd21c View commit details
    Browse the repository at this point in the history