Ver código fonte

tiny fix

Fix if condition and echo redirecting error message.
papadave 4 anos atrás
pai
commit
4610d8f5ce
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      curseforge-modpack-downloader.sh

+ 2 - 2
curseforge-modpack-downloader.sh

@@ -23,7 +23,7 @@
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 # check arguments
-if [ -z "$1" ]; then
+if [ $# != 1 ]; then
 	echo "Usage: curseforge-modpack-downloader manifest.json"
 	exit 1
 fi
@@ -31,7 +31,7 @@ fi
 # check dependencies
 for prog in jq wget; do
     if ! command -v "$prog" > /dev/null 2>&1; then
-        echo "$prog is not detected"; exit 1
+        echo "$prog is not detected" 1>&2; exit 1
     fi
 done