Kaynağa Gözat

Merge pull request #48 from bleuenvert/master

Changed dependency check from w3m to $BROWSER
Siddharth Dushantha 5 yıl önce
ebeveyn
işleme
f35169a4e5
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  1. 5 2
      tmpmail

+ 5 - 2
tmpmail

@@ -309,8 +309,11 @@ print_error() {
 }
 
 main() {
-    # Iterate of the array of dependencies and check if the user has them installed
-    for dependency in jq w3m curl; do
+    # Iterate of the array of dependencies and check if the user has them installed.
+    # We are checking if $BROWSER is installed instead of checking for 'w3m'. By doing
+    # this, it allows the user to not have to install 'w3m' if they are using another
+    # browser to view the HTML
+    for dependency in jq $BROWSER curl; do
         if ! command -v "$dependency" >/dev/null 2>&1; then
             print_error "Could not find '$dependency', is it installed?"
         fi