mirror of
https://github.com/restic/restic.git
synced 2025-03-13 16:44:04 +00:00
add environment-var expanding for exclude-files
This commit is contained in:
parent
5b33a7a903
commit
9644399074
@ -6,15 +6,15 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"golang.org/x/crypto/ssh/terminal"
|
|
||||||
"restic"
|
"restic"
|
||||||
"restic/backend"
|
"restic/backend"
|
||||||
"restic/debug"
|
"restic/debug"
|
||||||
"restic/filter"
|
"restic/filter"
|
||||||
"restic/repository"
|
"restic/repository"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"golang.org/x/crypto/ssh/terminal"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CmdBackup struct {
|
type CmdBackup struct {
|
||||||
@ -313,6 +313,7 @@ func (cmd CmdBackup) Execute(args []string) error {
|
|||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := scanner.Text()
|
line := scanner.Text()
|
||||||
if !strings.HasPrefix(line, "#") {
|
if !strings.HasPrefix(line, "#") {
|
||||||
|
line = os.ExpandEnv(line)
|
||||||
cmd.Excludes = append(cmd.Excludes, line)
|
cmd.Excludes = append(cmd.Excludes, line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user