File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,13 @@ build_obsidian_plugin() {
25
25
echo " Obsidian plugin manifest.json file not found at path $plugin_source !" ; exit 4
26
26
fi
27
27
28
- local plugin_json=$( cat ./manifest.json) || {
28
+ local plugin_json
29
+ plugin_json=$( cat ./manifest.json) || {
29
30
echo " Error: failed to read Obsidian plugin manifest.json file at path $plugin_source !" ; exit 5
30
31
}
31
32
32
- local plugin_id=$( echo $plugin_json | jq -r .id) || {
33
+ local plugin_id
34
+ plugin_id=$( echo " $plugin_json " | jq -r .id) || {
33
35
echo " Error: failed to read Obsidian plugin ID from manifest.json file when building plugin at path $plugin_source !" ; exit 6
34
36
}
35
37
@@ -71,7 +73,7 @@ build_obsidian_plugin() {
71
73
echo " Error: failed to install Obsidian plugin $plugin_id sub-project!" ; exit 8
72
74
}
73
75
74
- popd > /dev/null
76
+ popd > /dev/null || exit
75
77
76
78
npm run build || {
77
79
echo " Error: failed to build Obsidian plugin $plugin_id !" ; exit 8
@@ -100,10 +102,10 @@ build_obsidian_plugin() {
100
102
;;
101
103
esac
102
104
103
- popd > /dev/null
105
+ popd > /dev/null || exit
104
106
done
105
107
}
106
108
107
- if [ $1 != --source-only ]; then
108
- build_obsidian_plugin $@
109
+ if [ " $1 " != --source-only ]; then
110
+ build_obsidian_plugin " $@ "
109
111
fi
You can’t perform that action at this time.
0 commit comments