« get me outta code hell

Skip "paths" that start with '--' when starting up - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/index.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-07-05 22:03:03 -0300
committerFlorrie <towerofnix@gmail.com>2019-07-05 22:03:03 -0300
commitf96eeceefc94256babe016b0e18b95f0cf467880 (patch)
tree6ede1da5dbab6ea8a1670d3f2fcc9bcf0f8d4ab5 /index.js
parent08a3150fe9c9427bdb9e46d0cde14ad30747008d (diff)
Skip "paths" that start with '--' when starting up
Diffstat (limited to 'index.js')
-rwxr-xr-xindex.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.js b/index.js
index 23d0449..102e75a 100755
--- a/index.js
+++ b/index.js
@@ -137,7 +137,9 @@ async function main() {
 
   const loadPlaylists = async () => {
     for (let i = 2; i < process.argv.length; i++) {
-      await appElement.handlePlaylistSource(process.argv[i], true)
+      if (!process.argv[i].startsWith('--')) {
+        await appElement.handlePlaylistSource(process.argv[i], true)
+      }
     }
   }