diff options
author | Minteck <contact@minteck.org> | 2022-04-12 14:50:58 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-04-12 14:50:58 +0200 |
commit | 637ca7ba746c0241aaec79b79349d5dac4ec7408 (patch) | |
tree | ca78ede20f97198de77cccc84c4396b996c0d55e /index.js | |
parent | b3ce2bb1e0dd9e0035f003254b4acc4c89e2e72c (diff) | |
download | twilight-637ca7ba746c0241aaec79b79349d5dac4ec7408.tar.gz twilight-637ca7ba746c0241aaec79b79349d5dac4ec7408.tar.bz2 twilight-637ca7ba746c0241aaec79b79349d5dac4ec7408.zip |
Add option to ignore unsafe packages
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -120,6 +120,10 @@ try { .help()
.alias("help", "h")
.alias("version", "V")
+ .option('ignore-unsigned-packages', {
+ type: 'boolean',
+ description: 'Do not ask for confirmation when installing an unsigned package update'
+ })
.example("twi install neutron", "Install Neutron")
.example("twi update", "Update all packages")
.example("twi info ponyfind", "Show info about Ponyfind")
@@ -128,6 +132,8 @@ try { .usage('Usage: twi <command> [arguments...]')
.argv;
+ global.ignoreUnsignedPackages = !!argv.ignoreUnsignedPackages;
+
if (fs.existsSync(home + "/runtime.pid")) {
let pid = fs.readFileSync(home + "/runtime.pid") - 1 + 1;
try {
|