@@ -27,16 +27,16 @@ basalt.package-init() {
27
27
source "$BASALT_GLOBAL_REPO/pkg/lib/public/basalt-load.sh"
28
28
source "$BASALT_GLOBAL_REPO/pkg/lib/public/basalt-package.sh"
29
29
30
- # TODO: this needs to be redone
30
+ # TODO: this needs to be redone
31
31
if [ -z "$BASALT_PACKAGE_PATH" ]; then
32
- local __old_cd="$PWD"
33
- if [ -L "$0" ]; then
34
- local __file="$(readlink "$0")"
35
- if ! cd "${__file%/*}"; then
36
- printf '%s\n' "Error: basalt-package-init: Could not cd to target of '$0'"
37
- return 1
38
- fi
39
- fi
32
+ local __old_cd="$PWD"
33
+ if [ -L "$0" ]; then
34
+ local __file="$(readlink "$0")"
35
+ if ! cd "${__file%/*}"; then
36
+ printf '%s\n' "Error: basalt-package-init: Could not cd to target of '$0'"
37
+ return 1
38
+ fi
39
+ fi
40
40
41
41
if ! BASALT_PACKAGE_PATH="$(
42
42
while [ ! -f 'basalt.toml' ] && [ "$PWD" != / ]; do
@@ -52,17 +52,17 @@ basalt.package-init() {
52
52
printf '%s' "$PWD"
53
53
)"; then
54
54
printf '%s\n' "Error: basalt-package-init: Could not find basalt.toml"
55
- if ! cd "$__old_cd"; then
56
- printf '%s\n' "Error: basalt-package-init: Could not cd back to '$__old_cd'"
57
- return 1
58
- fi
59
- return 1
55
+ if ! cd "$__old_cd"; then
56
+ printf '%s\n' "Error: basalt-package-init: Could not cd back to '$__old_cd'"
57
+ return 1
58
+ fi
59
+ return 1
60
60
fi
61
61
62
- if ! cd "$__old_cd"; then
63
- printf '%s\n' "Error: basalt-package-init: Could not cd back to '$__old_cd'"
64
- return 1
65
- fi
62
+ if ! cd "$__old_cd"; then
63
+ printf '%s\n' "Error: basalt-package-init: Could not cd back to '$__old_cd'"
64
+ return 1
65
+ fi
66
66
fi
67
67
}
68
68
EOF
0 commit comments