A peer-to-peer stack for code collaboration
rad-create-keys: Feedback when successfully created
Thomas Scholtesa4e80f480d00
diff --git a/bin/rad-create-keys b/bin/rad-create-keysindex 6aa19fc..c8c2002 100755--- a/bin/rad-create-keys+++ b/bin/rad-create-keys@@ -17,7 +17,10 @@this can be adjusted by setting `$XDG_CONFIG_HOME`.")(def make-keys- (fn [] (key-mgmt/create-keys!)))+ (fn []+ (def key-path (key-mgmt/create-keys!))+ (put-str! (string-append "Successfully created " key-path))+ ))(def safe-make-keys(fn []diff --git a/docs/source/reference.rst b/docs/source/reference.rstindex 06fb1f4..e5085be 100644--- a/docs/source/reference.rst+++ b/docs/source/reference.rst@@ -1144,7 +1144,8 @@ file doesn't exist.``(create-keys!)``~~~~~~~~~~~~~~~~~~-Creates a new key pair and stores it in ``my-keys.rad``+Creates a new key pair and stores it in ``my-keys.rad``. Returns the+full absolute path of the created file.``(use-fake-keys!)``~~~~~~~~~~~~~~~~~~~~diff --git a/rad/prelude/key-management.rad b/rad/prelude/key-management.radindex 5912f58..dbb2b12 100644--- a/rad/prelude/key-management.rad+++ b/rad/prelude/key-management.rad@@ -41,8 +41,10 @@(fn [x] :nothing))))))(def create-keys!- "Creates a new key pair and stores it in `my-keys.rad`"+ "Creates a new key pair and stores it in `my-keys.rad`. Returns the+ full absolute path of the created file."(fn [](io/shell! (string-append "mkdir -p " (base-path)) "")(def kp (gen-key-pair! (default-ecc-curve)))- (io/write-file! (key-path) (show kp))))+ (io/write-file! (key-path) (show kp))+ (key-path)))