Skip to content

Bug: Improper pathname parsing in nspawn function #38

@gitaalekhyapaul

Description

@gitaalekhyapaul

Bug Description:

The pathname parsing in nspawn function does not take into consideration spaces in the pathname.

Consider the following pathname of a CLI application: /home/user/Project Folder/Sub Folder/bin/cli (note the spaces in the pathname)

In the lines 360-362 in nexpect.js, we can see the following code:

Screenshot from 2021-05-13 17-29-03

Suppose we consider our above pathname, we can clearly observe:

  • command will be: /home/user/Project
  • params will be: params OR [ "Folder/Sub" , "Folder/bin/cli" ]

This leads to improper pathanme parsing and errors in testing.

Expected Behaviour:

The pathname should be parsed properly even if it contains spaces in it.

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