Skip to content

Commit 0124fd3

Browse files
authored
Merge pull request #1 from testnet0/main
支持通过命令行指定配置文件路径
2 parents 15d994e + f3a43af commit 0124fd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

config/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ VolcengineKey: ""
6262
HuaweiID: ""
6363
HuaweiKey: ""
6464
`)
65-
err = os.WriteFile("config.yaml", configContent, 0644)
65+
// 支持通过命令行指定配置文件路径,而不是固定当前目录
66+
err = os.WriteFile(filePath, configContent, 0644)
6667
if err != nil {
6768
log.Fatal("创建配置文件失败", err)
6869
}

0 commit comments

Comments
 (0)