mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
snow: confirm before uploading packages
Uploading a package is an irreversible operation. It's not even about accidentally leaking your secret sauce to the internet. You could upload a package to snow-fort.org by accident and pullute the package name space [1]. So let's ask the user first before going ahead uploading stuff. We only ask once even if we're going to upload a dozen packages, so it's not that annoying. The target repo is also shown in case you want to upload to a custom repo and want to make sure it does so. [1] I did (while attempting to uploading to a local snow-fort instance during testing). I guess `(chibi snow commands)` is forever mine now.
This commit is contained in:
parent
645bf03749
commit
711c89cd97
1 changed files with 8 additions and 4 deletions
|
@ -947,9 +947,11 @@
|
||||||
((package-file? (car o))
|
((package-file? (car o))
|
||||||
(if (not (every package-file? (cdr o)))
|
(if (not (every package-file? (cdr o)))
|
||||||
(non-homogeneous))
|
(non-homogeneous))
|
||||||
(for-each
|
(if (yes-or-no? cfg "Upload " o " to "
|
||||||
(lambda (package) (upload-package cfg spec package))
|
(remote-uri cfg '(command package uri) "/?"))
|
||||||
o))
|
(for-each
|
||||||
|
(lambda (package) (upload-package cfg spec package))
|
||||||
|
o)))
|
||||||
(else
|
(else
|
||||||
(if (any package-file? (cdr o))
|
(if (any package-file? (cdr o))
|
||||||
(non-homogeneous))
|
(non-homogeneous))
|
||||||
|
@ -958,7 +960,9 @@
|
||||||
(package (create-package (car spec+files)
|
(package (create-package (car spec+files)
|
||||||
(cdr spec+files)
|
(cdr spec+files)
|
||||||
package-file)))
|
package-file)))
|
||||||
(upload-package cfg spec package package-file)))))
|
(if (yes-or-no? cfg "Upload " o " to "
|
||||||
|
(remote-uri cfg '(command package uri) "/?"))
|
||||||
|
(upload-package cfg spec package package-file))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Remove - removes the listed libraries.
|
;; Remove - removes the listed libraries.
|
||||||
|
|
Loading…
Add table
Reference in a new issue