Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2d89352a3 |
3
.changes/v0.11.4.md
Normal file
3
.changes/v0.11.4.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## v0.11.4 - 2026-02-01
|
||||||
|
### Changed
|
||||||
|
* Command.[name].output.file: now appends correctly to the beginning of file in an absolute path
|
||||||
@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v0.11.4 - 2026-02-01
|
||||||
|
### Changed
|
||||||
|
* Command.[name].output.file: now appends correctly to the beginning of file in an absolute path
|
||||||
|
|
||||||
## v0.11.3 - 2026-01-31
|
## v0.11.3 - 2026-01-31
|
||||||
### Added
|
### Added
|
||||||
* Command: saveShellHistory for scriptFile commands over SSH
|
* Command: saveShellHistory for scriptFile commands over SSH
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
const versionStr = "0.11.3"
|
const versionStr = "0.11.4"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
versionCmd = &cobra.Command{
|
versionCmd = &cobra.Command{
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/user"
|
"os/user"
|
||||||
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -473,8 +474,14 @@ func (command *Command) RunCmdOnHost(cmdCtxLogger zerolog.Logger, opts *ConfigOp
|
|||||||
// Set output writers
|
// Set output writers
|
||||||
var file *os.File
|
var file *os.File
|
||||||
if !IsHostLocal(command.Host) && command.Output.File != "" {
|
if !IsHostLocal(command.Host) && command.Output.File != "" {
|
||||||
|
if filepath.IsAbs(command.Output.File) {
|
||||||
|
fileName := filepath.Base(command.Output.File)
|
||||||
|
fileName = fmt.Sprintf("%s_%s", command.RemoteHost.Host, fileName)
|
||||||
|
command.Output.File = filepath.Join(filepath.Dir(command.Output.File), fileName)
|
||||||
|
} else {
|
||||||
command.Output.File = fmt.Sprintf("%s_%s", command.RemoteHost.Host, command.Output.File)
|
command.Output.File = fmt.Sprintf("%s_%s", command.RemoteHost.Host, command.Output.File)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cmdOutWriters, file, err = makeCmdOutWriters(&cmdOutBuf, command.Output.File)
|
cmdOutWriters, file, err = makeCmdOutWriters(&cmdOutBuf, command.Output.File)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user