Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
fix(project): return useful error message when node.js is missing
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #107
  • Loading branch information
moranje committed Mar 26, 2019
1 parent 48d9ab8 commit a8a966e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions dist/workflow/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ node alfred-workflow-todoist.js remove "{query}"</string>
export PATH="$PATH:/usr/local/bin:/usr/bin"
if which node &gt; /dev/null; then
else
echo "You need to have node (8.5 or up) installed for this workflow to work."
echo "Have a look at the docs:"
echo ""
echo "https://github.com/moranje/alfred-workflow-todoist#installation"
exit 1
fi
node alfred-workflow-todoist.js read "{query}"</string>
<key>scriptargtype</key>
<integer>0</integer>
Expand Down Expand Up @@ -252,6 +261,15 @@ node alfred-workflow-todoist.js submit "{query}"</string>
export PATH="$PATH:/usr/local/bin:/usr/bin"
if which node &gt; /dev/null; then
else
echo "You need to have node (8.5 or up) installed for this workflow to work."
echo "Have a look at the docs:"
echo ""
echo "https://github.com/moranje/alfred-workflow-todoist#installation"
exit 1
fi
node alfred-workflow-todoist.js create "{query}"</string>
<key>scriptargtype</key>
<integer>0</integer>
Expand Down Expand Up @@ -359,6 +377,15 @@ export PATH="$PATH:/usr/local/bin:/usr/bin"
# IDEA: should return a list with options (eg: settings, (check for) update, install, refresh_cache)
if which node &gt; /dev/null; then
else
echo "You need to have node (8.5 or up) installed for this workflow to work."
echo "Have a look at the docs:"
echo ""
echo "https://github.com/moranje/alfred-workflow-todoist#installation"
exit 1
fi
node alfred-workflow-todoist.js settings "{query}"</string>
<key>scriptargtype</key>
<integer>0</integer>
Expand Down

0 comments on commit a8a966e

Please sign in to comment.