Skip to content

Commit 83dc874

Browse files
committed
add flag for printing config path
1 parent 16c3c46 commit 83dc874

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/putio-sync/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ var (
3636
dryrun = flag.Bool("dryrun", false, "do not make changes on filesystems")
3737
repeat = flag.Duration("repeat", 0, "sync repeatedly, pause given duration between syncs")
3838
server = flag.String("server", "", "listen address for HTTP API")
39+
40+
printConfigPath = flag.Bool("print-config-path", false, "print config path")
3941
)
4042

4143
var (
@@ -93,6 +95,10 @@ func main() {
9395
log.Fatal(err)
9496
}
9597
}
98+
if *printConfigPath {
99+
fmt.Println(configPath)
100+
return
101+
}
96102
log.Infof("Using config file %q", configPath)
97103
if err = readConfig(configPath, *configFlag != ""); err != nil {
98104
log.Fatal(err)

0 commit comments

Comments
 (0)