-
Notifications
You must be signed in to change notification settings - Fork 71
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
os.getcwd() is used in DockerCreateRunner #447
Comments
Not actually. The idea behind is loading a conanfile according cwd, which is executed before to run DockerCreateRunner. https://github.com/conan-io/conan-package-tools/blob/develop/cpt/packager.py#L212
conan-package-tools/cpt/runner.py Line 277 in 2f7a5ac
|
@uilianries Thanks for the quick response! Maybe I'm doing something wrong. Is it possible to run build.py from a directory where there is no recipe? My configuration:
And I run build.py from foo directory. This is why I use the cwd argument for ConanMultiPackager, which is bar in this case, and it works without docker. But with docker os.getcwd() returns foo directory. Therefore, the foo folder is mounted to docker but I expect bar folder. |
Has been hit this issue too. This really makes sense when you have multiple directories with recipes (like in CCI with A possible fix is to pass cwd to |
@uilianries what do you think? I can make a PR so new behaviour can be checked for typical scenarios. |
@theirix Go ahead, let's see if is possible adding it without breaking the current behavior. |
Patch allows to build packages using Docker in non-flat repositories with specifying cwd. Example: builder = ConanMultiPackager(cwd=os.path.join(os.getcwd(), 'recipes', 'foobar'))
The patch allows building packages using Docker in non-flat repositories with specifying cwd. Example: builder = ConanMultiPackager(cwd=os.path.join(os.getcwd(), 'recipes', 'foobar'))
The patch allows building packages using Docker in non-flat repositories with specifying cwd. Example: builder = ConanMultiPackager(cwd=os.path.join(os.getcwd(), 'recipes', 'foobar'))
The patch allows building packages using Docker in non-flat repositories with specifying cwd. Example: builder = ConanMultiPackager(cwd=os.path.join(os.getcwd(), 'recipes', 'foobar'))
The patch allows building packages using Docker in non-flat repositories with specifying cwd. Example: builder = ConanMultiPackager(cwd=os.path.join(os.getcwd(), 'recipes', 'foobar'))
fixed by #528 |
The patch allows building packages using Docker in non-flat repositories with specifying cwd. Example: builder = ConanMultiPackager(cwd=os.path.join(os.getcwd(), 'recipes', 'foobar'))
Additional info
Class DockerCreateRunner uses os.getcwd():
I think it should use cwd parameter from ConanMultiPackager class
The text was updated successfully, but these errors were encountered: