Open gitaalekhyapaul opened 3 years ago
The pathname parsing in nspawn function does not take into consideration spaces in the pathname.
nspawn
Consider the following pathname of a CLI application: /home/user/Project Folder/Sub Folder/bin/cli (note the spaces in the pathname)
/home/user/Project Folder/Sub Folder/bin/cli
In the lines 360-362 in nexpect.js, we can see the following code:
nexpect.js
/home/user/Project
params
[ "Folder/Sub" , "Folder/bin/cli" ]
This leads to improper pathanme parsing and errors in testing.
The pathname should be parsed properly even if it contains spaces in it.
A detailed description of this issue can be found here: aws-amplify/amplify-cli#7324
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:Suppose we consider our above pathname, we can clearly observe:
/home/user/Project
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.