Port to newest libmutton development version

This commit is contained in:
2025-01-16 13:49:21 -05:00
parent cb1b010e0a
commit d1d88c2e69
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ go 1.23.4
require (
github.com/Trojan2021/BEAN v0.0.0-20241210230804-8f294833b514
github.com/charmbracelet/glamour v0.7.0
github.com/rwinkhart/libmutton v0.2.5-0.20250113021621-0162b737c84d
github.com/rwinkhart/libmutton v0.2.5-0.20250116184730-89b74cec1e01
golang.org/x/term v0.28.0
)
+2 -2
View File
@@ -58,8 +58,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rwinkhart/convertroman v0.2.0 h1:otUm939eXT77q/Lr31mJtMwVWEw0RjEUB71gO65h9OM=
github.com/rwinkhart/convertroman v0.2.0/go.mod h1:Af6HqvX0EIM4Y3HcnNXbbRey1dLasGB7WU0+3Cowgmw=
github.com/rwinkhart/libmutton v0.2.5-0.20250113021621-0162b737c84d h1:emQGD6aOco2yk05s4nkAIImlRAGsiYPOsQ3ImzJBwso=
github.com/rwinkhart/libmutton v0.2.5-0.20250113021621-0162b737c84d/go.mod h1:kn7x0901qFyX1/HBxJf287zoySZkxKRMObKigLiI5Ok=
github.com/rwinkhart/libmutton v0.2.5-0.20250116184730-89b74cec1e01 h1:+1S0VkBSMhYYyr0L7ukFni7uxJhbas19bk2TsMd+qj0=
github.com/rwinkhart/libmutton v0.2.5-0.20250116184730-89b74cec1e01/go.mod h1:kn7x0901qFyX1/HBxJf287zoySZkxKRMObKigLiI5Ok=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
+3 -3
View File
@@ -57,18 +57,18 @@ func TempInitCli() {
oldDeviceID := core.DirInit(false)
// write config file (temporarily assigns sshEntryRoot and sshIsWindows to null to pass initial device ID registration)
core.WriteConfig([][3]string{{"MUTN", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}, {"LIBMUTTON", "sshUser", sshUser}, {"LIBMUTTON", "sshIP", sshIP}, {"LIBMUTTON", "sshPort", sshPort}, {"LIBMUTTON", "sshKey", sshKey}, {"LIBMUTTON", "sshKeyProtected", strconv.FormatBool(sshKeyProtected)}, {"LIBMUTTON", "sshEntryRoot", "null"}, {"LIBMUTTON", "sshIsWindows", "false"}}, false)
core.WriteConfig([][3]string{{"MUTN", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}, {"LIBMUTTON", "sshUser", sshUser}, {"LIBMUTTON", "sshIP", sshIP}, {"LIBMUTTON", "sshPort", sshPort}, {"LIBMUTTON", "sshKey", sshKey}, {"LIBMUTTON", "sshKeyProtected", strconv.FormatBool(sshKeyProtected)}, {"LIBMUTTON", "sshEntryRoot", "null"}, {"LIBMUTTON", "sshIsWindows", "false"}}, nil, false)
// generate and register device ID
sshEntryRoot, sshIsWindows := sync.DeviceIDGen(oldDeviceID)
// update config file with sshEntryRoot and sshIsWindows
core.WriteConfig([][3]string{{"LIBMUTTON", "sshEntryRoot", sshEntryRoot}, {"LIBMUTTON", "sshIsWindows", sshIsWindows}}, true)
core.WriteConfig([][3]string{{"LIBMUTTON", "sshEntryRoot", sshEntryRoot}, {"LIBMUTTON", "sshIsWindows", sshIsWindows}}, nil, true)
} else {
// initialize libmutton directories
core.DirInit(false)
// write config file
core.WriteConfig([][3]string{{"MUTN", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}}, false)
core.WriteConfig([][3]string{{"MUTN", "textEditor", textEditor}, {"LIBMUTTON", "gpgID", gpgID}}, nil, false)
}
}