Skip to content

Commit

Permalink
refactor: check if p.Backup is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
seiuneko committed Mar 30, 2024
1 parent e429d09 commit 1008fea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ func (p *Profile) resolveSourcePath(sourceBase string, sourcePaths ...string) []

sourceBase = fixPath(sourceBase, expandEnv, expandUserHome)
// When "source-relative" is set, the source paths are relative to the "source-base"
if !p.Backup.SourceRelative {
if p.Backup == nil || !p.Backup.SourceRelative {
// Backup source is NOT relative to the configuration, but to PWD or sourceBase (if not empty)
// Applying "sourceBase" if set
if sourceBase = strings.TrimSpace(sourceBase); sourceBase != "" {
Expand Down

0 comments on commit 1008fea

Please sign in to comment.