Skip to content

Commit

Permalink
Don't throw an error for uninstalled plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Mar 5, 2024
1 parent c836f8b commit 13818a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ jobs:
fi
done
zip -r "$PLUGIN_NAME".zip "$PLUGIN_NAME"
hub release create "${assets[@]}" -a "$PLUGIN_NAME".zip -m "$TAG_NAME" "$TAG_NAME"
gh release create "$TAG_NAME" -t "$TAG_NAME" -n "### $COMMIT_MESSAGE"
gh release upload --clobber "$TAG_NAME" "${assets[@]}" "$PLUGIN_NAME".zip
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = class HotReload extends Plugin {
watch(path) {
if (this.app.vault.adapter.watchers.hasOwnProperty(path)) return;
const realPath = [this.app.vault.adapter.basePath, path].join("/");
const lstat = fs.lstatSync(realPath);
const lstat = fs.lstatSync(realPath, {throwIfNoEntry: false});
if (lstat && (watchNeeded || lstat.isSymbolicLink()) && fs.statSync(realPath).isDirectory()) {
this.app.vault.adapter.startWatchPath(path, false);
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Hot Reload",
"author": "PJ Eby",
"authorUrl": "https://github.com/pjeby",
"version": "0.1.10",
"version": "0.1.11",
"minAppVersion": "0.15.9",
"description": "Automatically reload in-development plugins when their files are changed",
"isDesktopOnly": true
Expand Down

0 comments on commit 13818a8

Please sign in to comment.