Skip to content

Commit db79b25

Browse files
committed
Fix typo and detect failures properly.
Previously, we might not have noticed if an early generation failed, but the final one succeeded.
1 parent 1262bda commit db79b25

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bin/rust-petstore.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ for spec_path in \
3636
spec=$(basename "$spec_path" | sed 's/.yaml//' | sed 's/.json//' )
3737

3838
for library in hyper reqwest; do
39-
ags="generate --template-dir modules/openapi-generator/src/main/resources/rust
40-
--input-spec $spec_path
41-
--generator-name rust
42-
--output samples/client/petstore/rust/$library/$spec
43-
--additional-properties packageName=${spec}-${library}
44-
--library=$library $@"
45-
java ${JAVA_OPTS} -jar ${executable} ${ags}
39+
args="generate --template-dir modules/openapi-generator/src/main/resources/rust
40+
--input-spec $spec_path
41+
--generator-name rust
42+
--output samples/client/petstore/rust/$library/$spec
43+
--additional-properties packageName=${spec}-${library}
44+
--library=$library $@"
45+
java ${JAVA_OPTS} -jar ${executable} ${args} || exit 1
4646
done
4747
done

0 commit comments

Comments
 (0)