Skip to content

Commit 3b261bb

Browse files
author
gentele
committed
fix issues when dereferencing config values in up (sync start)
1 parent 936e0d3 commit 3b261bb

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

cmd/up.go

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,23 @@ func (cmd *UpCmd) startSync() []*synctool.SyncConfig {
368368
log.Panicf("Unable to list devspace pods: %s", err.Error())
369369
} else if pod != nil {
370370
syncConfig := &synctool.SyncConfig{
371-
Kubectl: cmd.kubectl,
372-
Pod: pod,
373-
Container: &pod.Spec.Containers[0],
374-
WatchPath: absLocalPath,
375-
DestPath: *syncPath.ContainerPath,
376-
ExcludePaths: *syncPath.ExcludePaths,
377-
DownloadExcludePaths: *syncPath.DownloadExcludePaths,
378-
UploadExcludePaths: *syncPath.UploadExcludePaths,
371+
Kubectl: cmd.kubectl,
372+
Pod: pod,
373+
Container: &pod.Spec.Containers[0],
374+
WatchPath: absLocalPath,
375+
DestPath: *syncPath.ContainerPath,
376+
}
377+
378+
if syncPath.ExcludePaths != nil {
379+
syncConfig.ExcludePaths = *syncPath.ExcludePaths
380+
}
381+
382+
if syncPath.DownloadExcludePaths != nil {
383+
syncConfig.DownloadExcludePaths = *syncPath.DownloadExcludePaths
384+
}
385+
386+
if syncPath.UploadExcludePaths != nil {
387+
syncConfig.UploadExcludePaths = *syncPath.UploadExcludePaths
379388
}
380389

381390
err = syncConfig.Start()

0 commit comments

Comments
 (0)