We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
/data
1 parent d0a7346 commit c64626dCopy full SHA for c64626d
1 file changed
divio_cli/localdev/utils.py
@@ -163,14 +163,20 @@ def has_service(self, service):
163
return service in self.get_services().keys()
164
165
def has_volume_mount(self, service, remote_path):
166
+ """
167
+ Services may look like the following depending on the OS:
168
+
169
+ - /home/user/some/path:/app:rw
170
+ - C:\whatever\windows\path:/app:rw (windows)
171
172
try:
173
service_config = self.get_services()[service]
174
except KeyError:
175
return False
176
177
for mount in service_config.get('volumes', []):
- data = mount.split(':')
- if data[1] == remote_path:
178
+ bits = mount.strip().split(':')
179
+ if len(bits) > 2 and bits[-2] == remote_path:
180
return True
181
182
0 commit comments