nikivi Posted August 12, 2017 Posted August 12, 2017 (edited) I have this workflow that I am trying to make. I pass in the correct path as {query} into Open File object but it refuses to open it. I checked the path the passed in path by running 'code ' and that path and it works perfectly. I just can't get it to run from Alfred. Perhaps I am not using Open File object correctly. I also tried creating a bash script object and running 'code $1' in it but that too doesn't work. I assume Alfred doesn't know about code command that I have installed in my environment which should open a passed in path in VS Code. Thank you for any help. Edited August 12, 2017 by nikivi
GuiB Posted August 13, 2017 Posted August 13, 2017 (edited) It's hard to determine since we can't see the code for you "alfred-edit-files" since it's binary and I can't see what this file is doing (what kind of item those it needs as input... file ? folder ? text ?)... However, I tried to send a file and the Alfred debugger complained about the JSON was missing expected keys: [2017-08-12 21:11:31][ERROR: input.scriptfilter] JSON is missing expected keys; items, variables or rerunafter: { "items": null } Maybe this is why it's not working on your side ? Also, I tried to send a file to the Open File object and it has worked. I'm just not sure why to try to set "{query} : {var:PATH}" inside the "Arg and Vars" object since the {query} would be what goes out of the object and, therefore, would be what you place on the bigger text field above Edited August 13, 2017 by GuiB nikivi 1
deanishe Posted August 13, 2017 Posted August 13, 2017 Use the debugger, @nikivi. Your path isn't valid: '', { ARG = paths; PATH = " /Users/nikivi/go/src/github.com/nikitavoloboev/alfred-edit-files/workflow/paths.csv"; } There's a space before the path. nikivi 1
nikivi Posted August 13, 2017 Author Posted August 13, 2017 Thank you @GuiB, @deanishe It was an issue with my code and the spacing was an issue. I did check debugger pane but not the 'All information' tab which is where I would have spotted this error. My bad. Sorry @GuiB for the lack of info. Will release this small workflow too soon as I think it could be useful to people.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now