v0.8.1 WIP
Some checks failed
ci/woodpecker/push/go-lint Pipeline failed

This commit is contained in:
2025-02-20 14:53:44 -06:00
parent c483a1056f
commit 1ad50ebcf8
11 changed files with 147 additions and 30 deletions

View File

@@ -64,6 +64,13 @@ func SetLogFile(logFile string) BackyOptionFunc {
}
}
// SetCmdStdOut forces the command output to stdout
func SetCmdStdOut(setStdOut bool) BackyOptionFunc {
return func(bco *ConfigOpts) {
bco.CmdStdOut = setStdOut
}
}
// EnableCron enables the execution of command lists at specified times
func EnableCron() BackyOptionFunc {
return func(bco *ConfigOpts) {
@@ -182,10 +189,12 @@ func IsTerminalActive() bool {
}
func IsCmdStdOutEnabled() bool {
return os.Getenv("BACKY_STDOUT") == "enabled"
return os.Getenv("BACKY_CMDSTDOUT") == "enabled"
}
func resolveDir(path string) (string, error) {
path = strings.TrimSpace(path)
if path == "~" {
homeDir, err := os.UserHomeDir()
if err != nil {