doc/news.texi | 10 ++++++++++ main.go | 5 +++-- run.go | 4 +++- usage.go | 2 +- diff --git a/doc/news.texi b/doc/news.texi index b4bebb815ca7ea0b3037523d5e3a42e7c854a79504267c7c9f8f7f7d85e370fb..d7a57cf84984857e4ec14d8dabfafdf724659e38f75a44715ec2ba6ab76765fb 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -1,6 +1,16 @@ @node News @unnumbered News +@anchor{Release 1.4.0} +@section Release 1.4.0 +@itemize +@item + Fixed proper @option{-xx} and @env{REDO_TRACE} workability, that + previously was not applied to all targets. +@item + Updated dependant libraries. +@end itemize + @anchor{Release 1.3.0} @section Release 1.3.0 @itemize diff --git a/main.go b/main.go index bee066231534cf0a2ad028d5c59a2138a7c39448b7153916cecd45c635e2e884..27ca495358ccd4b6bd30aab6ad138a19c083a3e379d247671d11d481d2523124 100644 --- a/main.go +++ b/main.go @@ -160,10 +160,11 @@ var traced bool if *flagTraceAll { mustSetenv(EnvTrace, "1") } - if *flagTrace { + if os.Getenv(EnvTrace) == "1" { + TracedAll = true traced = true } else { - traced = os.Getenv(EnvTrace) == "1" + traced = *flagTrace } // Those are internal envs diff --git a/run.go b/run.go index 9d2e970fb970b2ca8d92a0dcb19880e43c7ed35e73fd6c3e0d2ee855ade06f8f..b18e0443e769aef4b84b70786d5cf7310db783a5ece7031e472d937a8b8e2490 100644 --- a/run.go +++ b/run.go @@ -67,6 +67,8 @@ flagTrace = flag.Bool("x", false, "trace (sh -x) current targets") flagTraceAll = flag.Bool("xx", false, fmt.Sprintf("trace (sh -x) all targets (%s=1)", EnvTrace)) flagStderrKeep = flag.Bool("logs", false, fmt.Sprintf("keep job's stderr (%s=1)", EnvStderrKeep)) flagStderrSilent = flag.Bool("silent", false, fmt.Sprintf("do not print job's stderr (%s=1)", EnvStderrSilent)) + + TracedAll bool ) type RunErr struct { @@ -304,7 +306,7 @@ cmdName = doFilePath args = make([]string, 0, 3) } else { cmdName = "/bin/sh" - if traced { + if traced || TracedAll { args = append(args, "-ex") } else { args = append(args, "-e") diff --git a/usage.go b/usage.go index c2b81331f42d9c40a90a6b2b6d1b98e8c2a63f91fb4414c32d7f35cdb50ff28f..406d5c23cf4c42a94548f8053c3703125b8233981130de39a1cf94bd394d4b5a 100644 --- a/usage.go +++ b/usage.go @@ -24,7 +24,7 @@ "os" ) const ( - Version = "1.3.0" + Version = "1.4.0" Warranty = `Copyright (C) 2020-2021 Sergey Matveev This program is free software: you can redistribute it and/or modify