alfred-harvest icon indicating copy to clipboard operation
alfred-harvest copied to clipboard

Handle setup not being complete yet

Open Pezmc opened this issue 10 years ago • 0 comments

If you're not authenticated yet, instead of throwing PHP errors, which leads to invalid XML and the workflow crashing (see below) remind the user to 'setup' first.

This should work for all commands. Fixes #20

Previous error message:

[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row (null), Col (null): 'Document is empty' in XML:
Warning: fopen(../../../Workflow Data/com.neilrenicker.harvest/id.txt): failed to open stream: No such file or directory in Alred/Alfred.alfredpreferences/workflows/user.workflow.FC9CD668-0E69-43A1-9876-962C81B7318F/commands/auth.php on line 6
Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in Alred/Alfred.alfredpreferences/workflows/user.workflow.FC9CD668-0E69-43A1-9876-962C81B7318F/commands/auth.php on line 7
Warning: fclose() expects parameter 1 to be resource, boolean given in Alred/Alfred.alfredpreferences/workflows/user.workflow.FC9CD668-0E69-43A1-9876-962C81B7318F/commands/auth.php on line 8

Pezmc avatar Feb 20 '15 11:02 Pezmc