Skip to content
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

relative paths to exec.Cmd in test_suite.go #254

Closed
thockin opened this issue May 5, 2016 · 6 comments
Closed

relative paths to exec.Cmd in test_suite.go #254

thockin opened this issue May 5, 2016 · 6 comments
Assignees
Labels
v2 Issues that will be resolved by v2

Comments

@thockin
Copy link

thockin commented May 5, 2016

in testsuite.New() ginkgo says:

 86         Path:        relPath(dir),

Later that Path field gets used to construct an exec.Cmd, as the Dir field. The problem (it seems) is that when that Dir is expanded, if your CWD has any symlinks in it, things go sideways. In our case, Path becomes ./../../../../../../other/stuff, but then I get a chdir: no such file or directory and everything fails.

Is there a reason for making this path be relative? I tried just writing the "cleaned and abs'ed" dir into that field instead, and all of our tests seem OK with it. Can we change this?

@thockin thockin changed the title realtive paths to exec.Cmd in test_suite.go relative paths to exec.Cmd in test_suite.go May 6, 2016
@wasylkowski
Copy link

This has been opened a year ago and is still affecting developers that use symlinks (myself included). I second Tim's question. Can we change this?

@wasylkowski
Copy link

@onsi can you take a look? Thanks!

@onsi
Copy link
Owner

onsi commented Jun 1, 2017

Will try to take a look this week or next. Am trying to carve out a bit more time for Ginkgo this summer.

As always, though, a PR would be appreciated.

@alamages
Copy link
Collaborator

Hello @thockin @wasylkowski,

Can you please provide some more info to better understand the issue? How can I reproduce it? Can you give an example?

The problems appears when:

  • the CWD itself is a symlink?
  • the CWD contains symlinks? If yes, are the *_test.go files symlinks or a subfolder/package which contains tests is symlink?

Thanks

@onsi
Copy link
Owner

onsi commented Apr 6, 2021

I'm working through the backlog of old Ginkgo issues - apologies as this issue is probably stale now.

I'm adding this to the v2 backlog.

@onsi onsi added v2 Issues that will be resolved by v2 and removed bug waiting-for-response labels Apr 6, 2021
@onsi
Copy link
Owner

onsi commented Oct 6, 2021

I appreciate it's somewhat absurd that I've only just gotten around to this nearly five years later - however after a few attempts I haven't been able to reproduce it. I've made a symlink with a bunch of packages in it and can't get any invocation of ginkgo to fail. If anyone still has context I'd appreciate a little more detail to reproduce.

@onsi onsi closed this as completed Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Issues that will be resolved by v2
Projects
None yet
Development

No branches or pull requests

5 participants