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

Allow file:///someLocalDir remote uris #146

Closed
cr1st1p opened this issue Aug 26, 2021 · 0 comments
Closed

Allow file:///someLocalDir remote uris #146

cr1st1p opened this issue Aug 26, 2021 · 0 comments

Comments

@cr1st1p
Copy link

cr1st1p commented Aug 26, 2021

I wanted to drive test this program (without real ftp) and I used as remote something like file:///tmp/testDestination, but I got an error about remote being invalid.

A fix, below (tested):

diff --git a/src/Deployment/CliRunner.php b/src/Deployment/CliRunner.php
index 3c53073..efaf38b 100644
--- a/src/Deployment/CliRunner.php
+++ b/src/Deployment/CliRunner.php
@@ -110,7 +110,8 @@ class CliRunner
                if (
                        empty($config['remote'])
                        || !($urlParts = parse_url($config['remote']))
-                       || !isset($urlParts['scheme'], $urlParts['host'])
+                       || !isset($urlParts['scheme'])
+                       || (($urlParts['scheme'] != 'file') && !isset($urlParts['host']))
                ) {
                        throw new \Exception("Missing or invalid 'remote' URL in config.");
                }

@dg dg closed this as completed in 8400555 Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant