-
Notifications
You must be signed in to change notification settings - Fork 244
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
Fixes invalid paths when using rsync with Windows #1705
Fixes invalid paths when using rsync with Windows #1705
Conversation
This PR fixes the invalid paths that are being passed into OpenShift due to using `FromSlash` that defaults to whatever backslash / forwardslash the OS uses. This changes it so that `ToSlash` is used for transfering as *all* containers in OpenShift are Linux-based and thus forward-slashes are required. Closes issue redhat-developer#1429
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
@@ -626,6 +626,15 @@ func ApplyConfigCreateUrl(client *occlient.Client, componentConfig config.LocalC | |||
// Error if any | |||
func PushLocal(client *occlient.Client, componentName string, applicationName string, path string, out io.Writer, files []string, delFiles []string, isForcePush bool, globExps []string, show bool) error { | |||
glog.V(4).Infof("PushLocal: componentName: %s, applicationName: %s, path: %s, files: %s, delFiles: %s, isForcePush: %+v", componentName, applicationName, path, files, delFiles, isForcePush) | |||
|
|||
// Edge case: check to see that the path is NOT empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mohammedzee1000 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mohammedzee1000 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
if possible a unit test for |
@girishramnani I wrote a brief test for CopyFile but found it too cumbersome to actually emulate the copying over the files. This is covered via integration tests. But I'll look into other ways to test this functionality! |
Login failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on linux and windows both 🎉 worked well
code wise lgtm too
/lgtm
This PR fixes the invalid paths that are being passed into OpenShift due
to using
FromSlash
that defaults to whatever backslash / forwardslashthe OS uses.
This changes it so that
ToSlash
is used for transfering as allcontainers in OpenShift are Linux-based and thus forward-slashes are
required.
Also added:
To test this PR out:
git clone https://github.com/openshift/nodejs-ex
odo create nodejs --context ~/nodejs-ex
odo push -v 4 --context ~/nodejs-ex
odo watch -v 4 --context ~/nodejs-ex
Closes issue #1429