Skip to content

Commit fd0e533

Browse files
jaymzhfacebook-github-bot
authored andcommitted
Fix shellcheck errors (facebook#253)
Summary: Simple fix to get rid of one of our test failures Signed-off-by: Phil Dibowitz <phil@ipom.com> Pull Request resolved: facebook#253 Test Plan: Note: This script isn't used internally, only by downstream users of our open-source cookbooks Differential Revision: D69269416 fbshipit-source-id: f137222b1a8f2421088021575b4d1608df46eb24
1 parent 59d96b3 commit fd0e533

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/sync_fb_cookbooks.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,11 @@ done
143143
# or command-line...
144144
save_internaldir=""
145145
save_upstreamdir=""
146-
if [ -n "$internaldir" ]; then
146+
# +x syntax required to not trip up -u
147+
if [[ -n "${internaldir+x}" ]]; then
147148
save_internaldir="$internaldir"
148149
fi
149-
if [ -n "$upstreamdir" ]; then
150+
if [[ -n "${upstreamdir+x}" ]]; then
150151
save_upstreamdir="$upstreamdir"
151152
fi
152153

@@ -156,8 +157,8 @@ upstreamdir="$default_upstreamdir"
156157

157158
# now read the config file, if we have one
158159
if [ -e "$config" ]; then
159-
# shellcheck disable=SC1090
160160
info "Loading config from $config"
161+
# shellcheck disable=SC1090
161162
source "$config" || die "Configuration file $config malformed"
162163
fi
163164

0 commit comments

Comments
 (0)