-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Using Aruba in directories with spaces #490
Comments
Could you test the same thing, with a That could be done changing this line: |
@olleolleolle I've just tried with
Looks like the process is being spawned in a folder which doesn't exist because the path is truncated from the first space character. |
@odlp Thanks, now you've verified the issue still exists on |
@odlp Would you love to help out and try to fix this bug yourself? I would love to see more people hacking on aruba. 😄 |
This may not be so easy: This may be a problem in the |
And this seems to be more or less unmaintained as @enkessler doesn't have the resources to work on it: https://cucumberbdd.slack.com/archives/C62GZFLLT/p1509455288000065
|
I've been investigating if childprocess is still needed, since the built-in tools for Ruby have improved over the years. No conclusion yet, though. |
All right, I'll bite. What leads you to suspect that the problem is down a level in |
@enkessler It's mainly a hunch from what I learned about its inner workings while trying to get the Aruba Windows build on appveyor to run, in particular how it quotes the command and arguments. However, I haven't looked at how childprocess works on Linux.
Well, system works with commands that contain spaces, as long as I trick it into not starting a subshell. I'll see if I can test the exact command that fails in the tests. |
Well, that was very insightful. I'm preparing a fix now. |
@enkessler it turns out this particular issue is not due to childprocess. The problem on Windows is a different one. Since I don't run Windows locally breaking this down to a concrete bug report for childprocess is a bit tricky. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
Fixed in master. Needs fix on |
Fixed in still. Will be released in 0.14.4. |
Summary
Aruba (
0.14.2
) isn't able to spawn processes within folders which have spaces in the name.Expected Behavior
Current Behavior
Possible Solution
First-off the exception is obscured due to an undefined variable / method
cmd
:aruba/lib/aruba/processes/spawn_process.rb
Line 86 in 70a78ab
However this has been corrected to
commandline
in subsequent releases of Aruba. Correcting this line locally, and re-runningbundle exec cucumber -b
:The notable part here is the directory is incorrect:
It should be:
This could be because the
@process.cwd
needs to be escaped withShellwords.escape
or similar:aruba/lib/aruba/processes/spawn_process.rb
Line 76 in 70a78ab
And possibly the
command_string
before being passed toChildProcess
too:aruba/lib/aruba/processes/spawn_process.rb
Line 60 in 70a78ab
Steps to Reproduce (for bugs)
Context & Motivation
Ideally users wouldn't be in directories with spaces, but this can happen when the same project is unzipped multiple times for example. OSX in particular creates successive filenames like:
your_project
,your_project (1)
,your_project (2)
.The text was updated successfully, but these errors were encountered: