mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-09-01 22:57:21 -04:00
Add TEMPORARY sshyp-sync shim so that MUTN can be tested while native sync is under development
This commit is contained in:
@@ -6,9 +6,17 @@ import (
|
||||
"github.com/rwinkhart/MUTN/src/offline"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// TODO remove after native sync is implemented
|
||||
func SshypSync() {
|
||||
cmd := exec.Command("sshyp", "sync")
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Run()
|
||||
}
|
||||
|
||||
// input prompts the user for input and returns the input as a string
|
||||
func input(prompt string) string {
|
||||
fmt.Print("\n" + prompt + " ")
|
||||
@@ -56,7 +64,7 @@ func writeEntryShortcut(targetLocation string, unencryptedEntry []string, hidePa
|
||||
trimmedEntry := offline.RemoveTrailingEmptyStrings(unencryptedEntry)
|
||||
offline.WriteEntry(targetLocation, trimmedEntry)
|
||||
fmt.Println(ansiBold + "\nEntry Preview:" + offline.AnsiReset)
|
||||
EntryReader(trimmedEntry, hidePassword)
|
||||
EntryReader(trimmedEntry, hidePassword, true)
|
||||
} else {
|
||||
fmt.Println(offline.AnsiError + "No data supplied for entry" + offline.AnsiReset)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user