Skip to content

Commit 9cc5c37

Browse files
author
gentele
committed
improvements for devspace up
1 parent 9ab3442 commit 9cc5c37

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

cmd/init.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ func (cmd *InitCmd) addPortForwarding(port int) {
273273
}
274274

275275
func (cmd *InitCmd) addDefaultSyncConfig() {
276+
for _, syncPath := range *cmd.config.DevSpace.Sync {
277+
if *syncPath.LocalSubPath == "./" || *syncPath.ContainerPath == "/app" {
278+
return
279+
}
280+
}
276281
dockerignoreFile := filepath.Join(cmd.workdir, ".dockerignore")
277282
dockerignore, err := ioutil.ReadFile(dockerignoreFile)
278283
uploadExcludePaths := []string{}
@@ -285,12 +290,6 @@ func (cmd *InitCmd) addDefaultSyncConfig() {
285290
}
286291
}
287292

288-
for _, syncPath := range *cmd.config.DevSpace.Sync {
289-
if *syncPath.LocalSubPath == "./" || *syncPath.ContainerPath == "/app" {
290-
return
291-
}
292-
}
293-
294293
syncConfig := append(*cmd.config.DevSpace.Sync, &v1.SyncConfig{
295294
ContainerPath: configutil.String("/app"),
296295
LocalSubPath: configutil.String("./"),

0 commit comments

Comments
 (0)