Skip to content

Commit 656654d

Browse files
authored
Merge pull request #455 from Unpackerr/dn2_more_homedir
allow homedir expansion with filepath: notation
2 parents 8651d16 + e703088 commit 656654d

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace
1616
golang.org/x/mod v0.19.0
1717
golift.io/cnfg v0.2.3
18-
golift.io/cnfgfile v0.0.0-20240710213444-9de6c05a8a5e
18+
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48
1919
golift.io/rotatorr v0.0.0-20230911015553-cd2abbd726c7
2020
golift.io/starr v1.0.0
2121
golift.io/version v0.0.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
367367
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
368368
golift.io/cnfg v0.2.3 h1:cQsC4JS20njJyu5drtGefNmgN7M4HrLaRDNBPLit3pQ=
369369
golift.io/cnfg v0.2.3/go.mod h1:T4t8MFa8aZilCdIk1qQrN4mOGaFVPZ/qHQBBMbCIZJ0=
370-
golift.io/cnfgfile v0.0.0-20240710213444-9de6c05a8a5e h1:dv7KPAsQ+CuWT/GS/P8nGg68DnC9tbYMMWP9khwTCfY=
371-
golift.io/cnfgfile v0.0.0-20240710213444-9de6c05a8a5e/go.mod h1:zHm9o8SkZ6Mm5DfGahsrEJPsogyR0qItP59s5lJ98/I=
370+
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48 h1:c7cJWRr0cUnFHKtq072esKzhQHKlFA5YRY/hPzQrdko=
371+
golift.io/cnfgfile v0.0.0-20240713024420-a5436d84eb48/go.mod h1:zHm9o8SkZ6Mm5DfGahsrEJPsogyR0qItP59s5lJ98/I=
372372
golift.io/rotatorr v0.0.0-20230911015553-cd2abbd726c7 h1:8reg8mRdLxCz168FaGPf/kVxmDRDc92/Dhub54trdOc=
373373
golift.io/rotatorr v0.0.0-20230911015553-cd2abbd726c7/go.mod h1:59bC4ue06MetIY4iiHu3PCqVbzW0leGoCONZhH8dPZ8=
374374
golift.io/starr v1.0.0 h1:IDSaSL+ZYxdLT/Lg//dg/iwZ39LHO3D5CmbLCOgSXbI=

pkg/unpackerr/start.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ func Start() (err error) {
158158
os.Getuid(), os.Getgid(), getUmask(), version.Started.Round(time.Second))
159159
u.Debugf(strings.Join(strings.Fields(strings.ReplaceAll(version.Print("unpackerr"), "\n", ", ")), " "))
160160

161-
output, err := cnfgfile.Parse(u.Config, &cnfgfile.Opts{Name: "Unpackerr"})
161+
output, err := cnfgfile.Parse(u.Config, &cnfgfile.Opts{
162+
Name: "Unpackerr",
163+
TransformPath: expandHomedir,
164+
})
162165
if err != nil {
163166
return fmt.Errorf("using filepath: %w", err)
164167
}

0 commit comments

Comments
 (0)