Skip to content

bug in substitute-env-vars #40

@nivpgir

Description

@nivpgir

I belive I found a bug in substitute-env-vars:
reproduction:
running the following command
(display (substitute-env-vars "$SHELL bla bla bla"))

output:

assertion-violation: argument of wrong type [string-length]
                     #f

expected:

"/bin/bash bla bla bla"

this won't happen if the given string is the variable name by itself, only if the string is a space separated words and a '$ sign in front of one of them.

I've looked at the implementation substitute-env-vars, and a fix could be changing '#/' in the end of the function with a '#\ '.
that at least works for me.

all of the above is valid, of course, if the function should be able to perform on strings which include multiple words... if not, I think it should at least be noted on the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions