Skip to content

Commit 78a212f

Browse files
Exit if changing directory fails
1 parent 55c0bf2 commit 78a212f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/build_obsidian_plugin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null
1+
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null || exit
22

33
. ./obsidian_plugin_build_strategies.sh
44

5-
popd > /dev/null
5+
popd > /dev/null || exit
66

77
build_obsidian_plugin() {
88
for plugin_source in "$@"

src/install_obsidian_plugin.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null
1+
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null || exit
22

33
. ./build_obsidian_plugin.sh --source-only
44

5-
popd > /dev/null
5+
popd > /dev/null || exit
66

77
install_obsidian_plugin() {
88
local vault="$1"

src/install_obsidian_plugins.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# vault: the path to the root of the vault (the folder that contains the .obsidian folder).
88
# source: the path from a plugin folder (.obsidian/plugins/plugin) to its source code.
99

10-
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null
10+
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null || exit
1111

1212
. ./install_obsidian_plugin.sh --source-only
1313

14-
popd > /dev/null
14+
popd > /dev/null || exit
1515

1616
install_obsidian_plugins() {
1717
local vault="$1"

0 commit comments

Comments
 (0)