Skip to content

Commit a339c98

Browse files
committed
make trust safer (cut) and another release try
1 parent 36953c7 commit a339c98

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

.goreleaser.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ snapshot:
4949
release:
5050
# Use the release-notes.md file generated in the GitHub Actions workflow
5151
# as the content for the GitHub release.
52-
notes_file: "release-notes.md"
52+
notes:
53+
from_file: "release-notes.md"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Import Command:** The `import` command now provides more detailed feedback, reporting errors for invalid key lines instead of skipping them silently.
1313

1414
### Fixed
15+
- **GoReleaser Configuration:** Corrected the `release` section in `.goreleaser.yml` to be compatible with GoReleaser v2, resolving release failures.
16+
- **CLI Parsing:** Improved argument parsing in the `trust-host` command for consistency and robustness.
1517
- **Deployment Compatibility:** The SFTP deployment logic now uses a backup-and-rename strategy, improving compatibility with SFTP servers that do not support atomic overwrites (e.g., on Windows).
1618
- **Build Failures:** Resolved two separate build failures: one caused by a function being redeclared, and another by a package import conflict in `main.go`.
1719
- **File Formatting:** Refined the `authorized_keys` file generator to ensure consistent formatting and a single trailing newline, adhering to POSIX standards.

cmd/keymaster/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,10 @@ step before Keymaster can manage a new host.`,
420420
Run: func(cmd *cobra.Command, args []string) {
421421
// DB is initialized in PersistentPreRunE.
422422
target := args[0]
423-
parts := strings.Split(target, "@")
424-
if len(parts) != 2 {
423+
_, hostname, found := strings.Cut(target, "@")
424+
if !found {
425425
log.Fatalf("Invalid account format. Expected user@host.")
426426
}
427-
hostname := parts[1]
428427

429428
fmt.Printf("Attempting to retrieve host key from %s...\n", hostname)
430429
key, err := deploy.GetRemoteHostKey(hostname)

0 commit comments

Comments
 (0)