Skip to content

Can not stub commands with a period #9

@toote

Description

@toote

When trying to stub commands with a period you get an error as follows:

   (from function `stub' in file /usr/local/lib/bats/bats-mock/stub.bash, line 11,
    in test file FILE, line X)
     `stub command.extension \' failed
   /usr/local/lib/bats/bats-mock/stub.bash: line 11: export: `COMMAND.EXTENSION_STUB_PLAN=/tmp/command.extension-stub-plan': not a valid identifier

Solution is probably quite easy (just replace the period in the command to create a valid variable name

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