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

Default System.cmd to File.cwd to fix running on slave nodes #8278

Closed

Conversation

mobileoverlord
Copy link
Contributor

Running System.cmd in a slave node without passing cd: File.cwd! will use the current working directory of the master node and not the slave node.

For example:

If you start a slave node and use File.cd "/somewhere" and then System.cmd("pwd", []) the returned result will be that of the master node and not /somewhere. This is problematic especially because of the use of File.cd!/2 where calls in the function expect this to work.

@josevalim
Copy link
Member

I am not convinced we should change this generally speaking. After all, this is based on ports, and ports still won't work as you describe. Nor anything else built on top ports. So the guarantee simply is not there.

I think you either need to change the relevant calls or start a discussion with Erlang/OTP about the behaviour between nodes and ports.

@mobileoverlord
Copy link
Contributor Author

I'll fix the issue in the places where its a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants