-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Backup not created if .trash is empty #55
Comments
And, unrelated, the bug report template asks for |
I submitted a pull request with that one line change! I'm not the most familiar with shell scripting, so my apologies if this isn't the best way to fix the issue 🙂 |
oh thank you! since I always have stuff in my trash, that's a bug isn't something I'd have stumbled upon my own 😅 Merged and released. And no worries, I am also not not too familiar with shell scripting, I didn't even know you can do |
I changed the keyword for that one, I think it's some sort of bug for Alfred, that changes in keywords do not get updated properly sometimes 🙁 |
okay, I tried some workaround in release 2.20.4, which should hopefully update the keyword properly |
Bug Description
Thanks for the amazing workflow! When I run the
obackup
command, if my$vault_path/.trash
folder is empty, the backup command will appear to run, but no backup is created. If the$vault_path/.trash
folder is not empty, the backup is created successfully.I believe the problem is line 16 of
scripts/obsidian-backup.sh
:if [[ "$itemCount" != "0" ]] ; then
. It appears to evaluate to "true" even when the.trash
folder is empty. When I changed line 16 toif (( ${itemCount} != 0 )) ; then
, the backup worked correctly both when.trash
was empty and when it had items in it.Relevant Screenshot
No response
To Reproduce
No response
Debugging Log
[14:11:33.988] Shimmering Obsidian[Script Filter] Queuing argument '(null)'
[14:11:34.746] Shimmering Obsidian[Keyword] Processing complete
[14:11:34.762] Shimmering Obsidian[Keyword] Passing output '' to Post Notification
[14:11:34.763] Shimmering Obsidian[Post Notification] Processing complete
[14:11:34.764] Shimmering Obsidian[Post Notification] Passing output '' to Run Script
[14:11:34.848] STDERR: Shimmering Obsidian[Run Script] mkdir: /Users/christyray/Library/Mobile Documents/iCloud
mdobsidian/Documents/Notes/.trash: File exists/Users/christyray/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.67A5BC3A-139E-46C4-A1F2-E42D30566510/scripts/obsidian-backup.sh:17: no matches found: ./.trash/*
[14:11:34.867] Shimmering Obsidian[Run Script] Processing complete
[14:11:34.869] Shimmering Obsidian[Run Script] Passing output '/Users/christyray/Scripts/Obsidian-Backup/Obsidian-Backup_2022-02-04_14-11.zip
' to Post Notification
[14:11:34.870] Shimmering Obsidian[Post Notification] Processing complete
[14:11:34.871] Shimmering Obsidian[Post Notification] Passing output '/Users/christyray/Scripts/Obsidian-Backup/Obsidian-Backup_2022-02-04_14-11.zip
' to Play Sound
[14:11:34.942] Shimmering Obsidian[Play Sound] Processing complete
[14:11:34.957] Shimmering Obsidian[Play Sound] Passing output '/Users/christyray/Scripts/Obsidian-Backup/Obsidian-Backup_2022-02-04_14-11.zip
' to Call External Trigger
[14:11:34.958] Shimmering Obsidian[External] Processing complete
[14:11:34.959] Shimmering Obsidian[External] Passing output '/Users/christyray/Scripts/Obsidian-Backup/Obsidian-Backup_2022-02-04_14-11.zip
' to Conditional
[14:11:34.961] Shimmering Obsidian[Conditional] Processing complete
[14:11:34.962] Shimmering Obsidian[Conditional] Passing output '/Users/christyray/Scripts/Obsidian-Backup/Obsidian-Backup_2022-02-04_14-11.zip
' to Run Script
Workflow Configuration
The ends of some of the paths are cut off, but I don't believe they are part of the issue.
Version & System Information
Make sure you have done the following
o ...
main search does not work, I have tried rerunningosetup
and it still does not work.The text was updated successfully, but these errors were encountered: